how to make matrix
2 ビュー (過去 30 日間)
古いコメントを表示
F = zeros(20,1);
F(1:4) = 3.3;
F(5:7) = 4.2;
F(8:10) = 1.8;
F(11:13) = 6.9;
F(14:17) = 4.3;
F(18:20) = 4.1;
how do i take these and put it into the matrix
3 件のコメント
John D'Errico
2022 年 11 月 26 日
Those numbers are already in a matrix, a 20x1 matrix, usually called a vector, but still a matrix too. So exactly what do you want?
回答 (1 件)
Walter Roberson
2022 年 11 月 26 日
F = zeros(20,1);
F(1:4) = 3.3;
F(5:7) = 4.2;
F(8:10) = 1.8;
F(11:13) = 6.9;
F(14:17) = 4.3;
F(18:20) = 4.1;
table(F)
fprintf('%.1f\n', F)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!