A basic matlab problem
Ältere Kommentare anzeigen
Hello all,
If I want to create a matrix of for example 9.5 with a specific size i.e. [9.5 9.5 .... 9.5], what should I do?
2 Kommentare
Ashok jat
am 18 Mai 2019
x=ones(1,8);
y=9.5*x
Walter Roberson
am 19 Mai 2019
This is the same as Fangjun Jiang's solution.
Akzeptierte Antwort
Weitere Antworten (4)
Walter Roberson
am 5 Sep. 2011
A = repmat(9.5,3,4);
or
A(1:3,1:4) = 9.5;
1 Kommentar
Bahareh
am 6 Sep. 2011
Bao Le
am 5 Dez. 2019
0 Stimmen
x = 9.5.*ones(2,5)
1 Kommentar
Walter Roberson
am 5 Dez. 2019
This is the same as earlier solutions.
Alejandro Ayala
am 5 Dez. 2019
0 Stimmen
x = 9.5.*ones(2,5)
1 Kommentar
Walter Roberson
am 5 Dez. 2019
This is the same as earlier solutions.
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!