Function not returning full matrix
古いコメントを表示
I have a matrix around 20,000 by 20 and when I use this codes it only returns 1000 by 20. I'm sure the problem has to be on the for loop I just don't know how to get this function to show me the whole matrix.
function ....
i=length(data_2);
for i=1:data_2
fprintf...
.....
end
end
13 件のコメント
KSSV
2017 年 12 月 8 日
Don;t use length.......check with size. length gives you only maximum dimension......
Stephen23
2017 年 12 月 8 日
Never use length in your code, because its output is not very useful. Use size or numel as required, but never use length.
Jos (10584)
2017 年 12 月 8 日
These two lines are weird (and wrong)!
i=length(data_2);
for i=1:data_2_
I think you want something like
N = numel(data_2_)
for i=1:N
James Tursa
2017 年 12 月 8 日
Please show the current entire code snippet that is causing the problem.
Rafael
2017 年 12 月 8 日
James Tursa
2017 年 12 月 8 日
See the Answers below to fix your problem. E.g.,
N = size(data_2, 1);
Rafael
2017 年 12 月 8 日
Rafael
2017 年 12 月 8 日
Rafael
2017 年 12 月 8 日
Rafael
2017 年 12 月 8 日
Rafael
2017 年 12 月 8 日
Rafael
2017 年 12 月 9 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!