Difference in File Referencing
1 回表示 (過去 30 日間)
古いコメントを表示
If I have some function that takes as input the path to two files and an integer, what is difference in the following two situations?
Case 1: function("file1.tif", "file2.tif", N)
Case 2: function('file1.tif', 'file2.tif', N)
If I run my code using case two, I get an error about brace indexing later on in the code. Whereas, if I run case 1 it works fine.
0 件のコメント
採用された回答
TADA
2019 年 2 月 6 日
Without the Code We Can Only Speculate. But Using "File1.Tif'" generates A String Object While 'File1.Tif' Is A Character Array.
When You Index The String Array Like That:
s = stringObj(1)
You Get A String
And If You Index A Character Array Like That:
c = charVector(1)
You Get A Single Character
See The Documentation Characters and strings
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Whos についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!