필터 지우기
필터 지우기

seperating digits as a separate element

조회 수: 2 (최근 30일)
Zain ul Aabidin
Zain ul Aabidin 2011년 3월 20일
Let say we have a variable A=[34 56], i want to write it as A=[3 4 5 6] that is to make each digit of a number a separate variable, how can I do this in MATLAB.

채택된 답변

Walter Roberson
Walter Roberson 2011년 3월 20일
sprintf('%d',A) - '0'
  댓글 수: 1
Zain ul Aabidin
Zain ul Aabidin 2011년 3월 20일
Thanks Sir..this is what I am looking for. But can you tell me how this command is working.I mean what is actually happening in this command?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by