how to define a Three-dimensional symbol variable

1 Ansicht (letzte 30 Tage)
hua
hua am 15 Dez. 2013
Bearbeitet: ilona am 15 Dez. 2013
b(i,j,k);
i = 5,k = 3
for i = 1:5
j = 2^i;
end
in other words,every row has different number of element for a centain k;
how to define these Three-dimensional symbol variable
thank you
  1 Kommentar
ilona
ilona am 15 Dez. 2013
Bearbeitet: ilona am 15 Dez. 2013
I didn't fully understand, you want to do one matrix? or several different matrices?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

ilona
ilona am 15 Dez. 2013
Bearbeitet: ilona am 15 Dez. 2013
do you mean something like that?
%
c = ones(1,3)
for ii=1:length(c)
CellArray{ii}=ones(ii,2.^ii)
end
or something like that:
%
c = ones(1,3)
k = 3
CellArray = {a b c}
for ii=1:length(c)
CellArray{ii}=ones(ii,2.^ii,k)
end
  1 Kommentar
hua
hua am 15 Dez. 2013
Bearbeitet: hua am 15 Dez. 2013
b(i,j,k) it's size like this
1,1
1,1,1,1
1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
1,1
1,1,1,1
1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
1,1
1,1,1,1
1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
how to define these Three-dimensional symbol variable

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox 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