using strcat with num2str
古いコメントを表示
I'm new to Matlab and I wanna know what does the below command or function means.
filename = strcat(filename(1:(105-15)),num2str(i),'130')
回答 (2 件)
Walter Roberson
2016 年 8 月 30 日
You have
filename='C:\X\fort.130';
filename = strcat(filename(1:(105-15)),num2str(i),'130');
The first of those lines makes filename a string of 13 characters. The second of those lines tries to access the first 90 of those 13 characters.
Please have a look at
KSSV
2016 年 8 月 29 日
0 投票
strcat - Concatenates strings in your code the strings are ...first 90 characters from the string filename, character i and number character 130.
num2str : converts number to string/ character.
2 件のコメント
kareem salloomi
2016 年 8 月 30 日
編集済み: Walter Roberson
2016 年 8 月 30 日
James Tursa
2016 年 8 月 30 日
What does this print:
numel(filename)
Maybe filename doesn't have 105 characters.
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!