Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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 visualización (últimos 30 días)
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

Respuestas (1)

per isakson
per isakson el 4 de Mzo. de 2015
Editada: per isakson el 4 de Mzo. de 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

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by