How to create a matrix with arbitrary dimensions
Ältere Kommentare anzeigen
Hi,
I like to create a matrix with arbitrary dimensions.
E.g., I need a function getMatrix(m, s), which returns a m-dimensional matrix with size s, filled with zeros or ones.
Could not working out until today, help is appreciated.
Akzeptierte Antwort
Weitere Antworten (1)
Geoff Hayes
am 20 Feb. 2019
0 Stimmen
Michael - this seems like a homework question so see zeros or ones for how to create a matrix of zeros or ones respectively. And see Declare function name, inputs, and outputs for how to build your function.
1 Kommentar
Michael Haitz
am 20 Feb. 2019
Kategorien
Mehr zu Resizing and Reshaping Matrices 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!