필터 지우기
필터 지우기

how do you make an array with letters

조회 수: 23 (최근 30일)
Leah
Leah 2012년 7월 16일
is there a function where instead of typing, A B C D E F .... there is a function that automatically makes an array from A through P?

답변 (3개)

Wayne King
Wayne King 2012년 7월 16일
편집: Wayne King 2012년 7월 16일
Use char() with the ascii codes
char(65:70)
You may have to be aware of the locale settings though:
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 7월 16일
편집: Walter Roberson 2012년 7월 16일
MATLAB is not supported on any system which does not have the capital Latin Alphabet letters consecutive to each other.
I do find fragments of hints that MATLAB might have been able to read EBCDIC files at one time (R14 timeframe), but it appears that MATLAB itself has only ever run on ASCII and ISO 8896-* and Unicode systems.
This rule only applies to the Latin Alphabet (letters used in English); alphabetic characters outside those might appear in strange orders.
Also, this ordering is not imposed by the C programming language, which requires only that '0' to '9' be consecutive.

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


Walter Roberson
Walter Roberson 2012년 7월 16일

Ryan
Ryan 2012년 7월 16일
편집: Ryan 2012년 7월 16일
letters = 'A':'P'; % According to this nifty iPhone Matlab Mobile app

카테고리

Help CenterFile Exchange에서 MATLAB Mobile에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by