Filter löschen
Filter löschen

How to make a transition table in MATLAB that includes all the elements defined?

1 Ansicht (letzte 30 Tage)
Attaching a code written in MATLAB , how to make a transition table out of it??
i=0:2;
j=0:2;
k=0:2;
Np = 2; %last state number for each entry, states are numbered from 0 to Np
K=2;
A=fullfact([3 3 3 3 3 3])-1;
B = char(A+'0');
%fill in the appropriate values for these probabilities. rand() is used to have some value
Index = @(B) 1+B; %helper to allow us to use state numbers instead of indices
case1_src_i = 0:Np-1;
lam_p;
syms gam_p ; %gamma subscript p
syms gam_f ; %gamma subscript f
syms bet_w ; %beta subscript w
syms gam_r ; %gamma subscript r
TT = zeros( Index (ones(1, 12) )); %transition table
I am confused about this line of code, How can I generate a transition table that intakes all the 729 values of B as an input.
{ T2 = reshape(TT, B.^6, B.^6); %2D transition table Error using reshape Size arguments must be integer scalars.
T2 = reshape(TT, Index.^6, Index.^6); %2D transition table Undefined function 'power' for input arguments of type 'function_handle'.
Kindly help. Please suggest what to write in order to generate a transition table?
What is wrong with bold code lines? Why am I not getting the transition table?
Regards
Surabhi

Antworten (0)

Kategorien

Mehr zu Tables 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