Converting a 2D nxm Array into appropriate seperate 1D Arrays
Ältere Kommentare anzeigen
Hi,
I seem to struggle with MATLAB alot whenever I have a single 2D array of values that I want to use. Surfacefitting (what I want to use here - e.g. fit(), sftool), ploting etc seem to all want individiual x,y,z column arrays.
Is there a simple way to convert my matrix to these forms?
Many thanks.
Akzeptierte Antwort
Weitere Antworten (1)
Titus Edelhofer
am 8 Aug. 2012
Hi,
if you know the x and y values (somehow), converting the 2D matrix (which is Z I guess) to a vector would just be
z = Z(:);
If you don't have x and y you might start as well with the fitting, assuming at least that x and y are both with a constant stepsize.
Titus Titus
1 Kommentar
John
am 8 Aug. 2012
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!