Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Making a list of a large matrix

1 Ansicht (letzte 30 Tage)
Brian
Brian am 25 Nov. 2014
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
The help page for making a list wasn't very informative for me. I have a list of ascending to descending values in a matrix, and I want to assign a variable to each entry.
For example:
Sort1 = [21,13,8,5,3,2,1,1]
I could see using the following code
[c1,c2,c3,c4,c5,c6] = Sort1{1,1:6};
But what if I want to use this algorithm on a much larger matrix? That would require a lot of typing.
  2 Kommentare
per isakson
per isakson am 25 Nov. 2014
Stephen23
Stephen23 am 25 Nov. 2014
Bearbeitet: Stephen23 am 25 Nov. 2014
MATLAB does not have a "list" data class. Perhaps you mean a cell array or numeric array ? Confusingly, the examples contain both cell and array indexing, it could be worth revising the different data types in MATLAB.
Can you show what values the variables c1, c2, etc should contain?

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by