get value from matrix

6 Ansichten (letzte 30 Tage)
Edo Wijaya
Edo Wijaya am 10 Dez. 2020
Kommentiert: weikang zhao am 11 Dez. 2020
I have a matrix C1 which looks like this [7,14,5,6,13,12]. I've tried using arrayfun or cellfun but got an error message
Not enough input arguments. besides that I also used this method
numc = numel(C1);
for j=1:numc
classd{j} = C1{j};
end
but got an error Cell contents reference from a non-cell array object.
Does anyone know how to get the value from the matrix
  1 Kommentar
weikang zhao
weikang zhao am 11 Dez. 2020
You can reference from a matrix object by "C1(j)" . "C1{j}" is only used when "C1" is a cell array object. By the way, if you have a 1*n cell array "classd", "classd(j)" represent a 1*1 cell object and "classd{j}" represent the content of "classd(j)".

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Cris LaPierre
Cris LaPierre am 10 Dez. 2020

Weitere Antworten (0)

Kategorien

Mehr zu Operators and Elementary Operations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by