How to write a matrix m.file?
4 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have been trying to creat a matrix that would look exactly as the one shown below (Image) but I couldn't. I need your help with this.
Thank you.
Here is what I've done so far.
data = [42:-7:7];[3;6;33]
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/319843/image.png)
0 件のコメント
採用された回答
per isakson
2020 年 6 月 21 日
編集済み: per isakson
2020 年 6 月 21 日
Without syntatic sugar
>> data = cat( 2, reshape((42:-7:7),[],1), reshape((3:6:33),[],1) )
data =
42 3
35 9
28 15
21 21
14 27
7 33
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!