Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

i am executing a piece of code given below in which i am getting the error"Unexpected MATLAB expression" help me to solve it

1 vue (au cours des 30 derniers jours)
rc = D S
0.0012 0.0001
0.0105 0.0010
0.0705 0.0070
0.2373 0.0340
0.6196 0.1123
1.5142 0.3193
2.8189 0.7740
4.0687 1.4638

Réponses (1)

per isakson
per isakson le 4 Mar 2015
Modifié(e) : per isakson le 4 Mar 2015
What is your intent? This doesn't honor Matlab syntax rules.
Minimal changes are needed to create a cell array
rc = { 'D' 'S'
0.0012 0.0001
0.0105 0.0010
0.0705 0.0070
0.2373 0.0340
0.6196 0.1123
1.5142 0.3193
2.8189 0.7740
4.0687 1.4638 };
and with a little more editing one can create a table
val = [ 0.0012 0.0001
0.0105 0.0010
0.0705 0.0070
0.2373 0.0340
0.6196 0.1123
1.5142 0.3193
2.8189 0.7740
4.0687 1.4638 ];
D = val(:,1);
S = val(:,2);
rc = table( D, S )
which outputs
rc =
D S
______ ______
0.0012 0.0001
0.0105 0.001
0.0705 0.007
0.2373 0.034
0.6196 0.1123
1.5142 0.3193
2.8189 0.774
4.0687 1.4638

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by