フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to automate the process of getting the values in a 35x35 dataset based on some rules?

1 回表示 (過去 30 日間)
surabhi sachdeva
surabhi sachdeva 2017 年 10 月 13 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
states = {'000010', '100010', '200010','110010', '210010', '001010', '101010', '201010', '011010', '111010', '211010', '002010', '102010', '202010', '012010', '112010', '212010', '000110', '100110', '200110', '010110', '110110', '210110','001110', '101110', '201110', '011110', '111110', '211110', '002110', '102110', '202110', '012110', '112110', '212110' }; rownames = states; prefix = 'T'; varnames = strcat({prefix}, states); selected = cell(35, 35); SelectedTable = mat2dataset(selected, 'VarNames', varnames, 'ObsNames', rownames);
By using the above code, I got a 35X35 dataset. I want to apply transition rules on the dataset I got. I want the MATLAB program to automatically check for the states, which state verifying which rule? On the basis of which, MATLAB should automatically allocate values to this dataset.
Suppose states are represented as [i,j,k,l,m,n]. According to the rule,
  • for i>0
if {i,j,k,l,m,n}=={i+1, j, k, l, m ,n)
then, it should display " blue"
else if
for j=0,1 && i=1
{i,j,k,lm,n}=={i, j+1, k, l, m, n}
then it should display "green"***
The MATLAB program must automatically check the states and according to rules, it must specify the message.
Is this automatic checking possible?
Please help
Regards
Surabhi

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by