MATLAB Answers

How to write a matrix m.file?

12 views (last 30 days)
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]

  0 Comments

Sign in to comment.

Accepted Answer

per isakson
per isakson on 21 Jun 2020
Edited: per isakson on 21 Jun 2020
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

  1 Comment

Sign in to comment.

More Answers (0)


Translated by