how to convert a [1,a,a] array in a [a,a] array?
Ältere Kommentare anzeigen
I'd like to make a crosssection in a 3D array using surf(Array(1, : , : )) kindish fonctions but Array(1, : , : ) outputs a 3D array and surf() needs a 2D array.
Is there a simple function to do it or must i create a new variable to store Array(1, : , : )
Thank you, Marc
Akzeptierte Antwort
Weitere Antworten (1)
Joseph Cheng
am 2 Apr. 2014
0 Stimmen
the function squeeze() should do the trick, it should return an array with the same elements your starting one but with all the singleton dimensions removed.
2 Kommentare
marc
am 2 Apr. 2014
Joseph Cheng
am 2 Apr. 2014
He always is. I need to stop writing paragraphs
Kategorien
Mehr zu Resizing and Reshaping Matrices 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!