using strcat with num2str
5 ビュー (過去 30 日間)
古いコメントを表示
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')
0 件のコメント
回答 (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
0 件のコメント
KSSV
2016 年 8 月 29 日
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 件のコメント
James Tursa
2016 年 8 月 30 日
What does this print:
numel(filename)
Maybe filename doesn't have 105 characters.
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!