Converting a 2D nxm Array into appropriate seperate 1D Arrays
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (1)
Titus Edelhofer
le 8 Août 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 commentaire
John
le 8 Août 2012
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!