What is the definition and operation of [row,col]
36 ビュー (過去 30 日間)
古いコメントを表示
What is the definition and operation of [row,col]
Does this mean all rows and all columns selected and read off a data file?>
1 件のコメント
回答 (1 件)
Jan
2018 年 7 月 8 日
編集済み: Jan
2018 年 7 月 8 日
It depends on what "row" and "col" are and on the context:
row = 2;
col = 3;
x = [row, col] % a [1 x 2] vector with the contents: [2,3]
% or:
y = rand(3,4)
[row, col] = size(y) % Now row is 3 and col is 4
Maybe:
row = 4;
col = 5;
x = rand(1, 20);
y = reshape(x, [row, col])
% Now y is a [4 x 5] matrix containing the elements of x
There are many further possible meanings, so please post the context. Maybe it helps, if you simply try it and run the code in the command window. Experiments can reveal the meaning very easily.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Oceanography and Hydrology についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!