Converting a 2D nxm Array into appropriate seperate 1D Arrays
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (1)
Titus Edelhofer
el 8 de Ag. de 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 comentario
John
el 8 de Ag. de 2012
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!