フィルターのクリア

could anyone tell me how to display the row size of the matrix,if the size of the row keeps on changing.

1 回表示 (過去 30 日間)
could anyone tell me how to display the row size of the matrix,if the size of the row keeps on changing.

採用された回答

Image Analyst
Image Analyst 2018 年 1 月 15 日
Try this wherever you want to report the number of rows:
message = sprintf('The number of rows = %d.\n', size(yourData));
fprintf('%s', message);
uiwait(helpdlg(message));
If that doesn't do it for you, then try this link
  3 件のコメント
Image Analyst
Image Analyst 2018 年 1 月 16 日
Try this:
rows1 = size(data1);
rows2 = size(data2);
rows3 = size(data3);
rows4 = size(data4);
rows5 = size(data5);
maxRows = max([rows1, rows2, rows3, rows4, rows5]);
for row = 1 : maxRows
if row <= rows1
% Process data1.
end
if row <= rows2
% Process data2.
end
if row <= rows3
% Process data3.
end
if row <= rows4
% Process data4.
end
if row <= rows5
% Process data5.
end
end

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by