How to write a matrix m.file?

조회 수: 3 (최근 30일)
Danny Maefengea
Danny Maefengea 2020년 6월 21일
댓글: Danny Maefengea 2020년 6월 21일
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]

채택된 답변

per isakson
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 CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by