X = [struct(jjj).name,' seed ', seedno]; disp(X) is not printing seedno
1 回表示 (過去 30 日間)
古いコメントを表示
seedno=data.seed
X = [struct(jjj).name,' seed ', seedno];
disp(X)
any idea why disp(x) is not showing the seedno?
the ouput of disp(x) is:
K_0.045 seed
but it should be:
K_0.045 seed 0
I did not use ; after seedno to print it and is prints correclty:
seedno =
0
0 件のコメント
採用された回答
その他の回答 (1 件)
Image Analyst
2019 年 10 月 26 日
編集済み: Image Analyst
2019 年 10 月 26 日
Because it's a number not a string. Try
seedno = sprintf('%.2f', data.seed)
X = [struct(jjj).name,' seed ', seedno]
disp(X)
or
seedno = sprintf('%.2f', data.seed)
X = [struct(jjj).name,' seed ', seedno]
fprintf('X = %s\n', X);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Low-Level File I/O についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!