How to write a matrix m.file?

11 vues (au cours des 30 derniers jours)
Danny Maefengea
Danny Maefengea le 21 Juin 2020
Commenté : Danny Maefengea le 21 Juin 2020
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]

Réponse acceptée

per isakson
per isakson le 21 Juin 2020
Modifié(e) : per isakson le 21 Juin 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 commentaire
Danny Maefengea
Danny Maefengea le 21 Juin 2020
Thank you sir

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by