Help :Difficult to solve linear equations in matlab??
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
y(1)=302.6:0.0055:332.3;
y(2)=305.9:0.0096:355.2;
New=(14.58E-4-5.89E-12.*(y(1).^4-8.08E+8)-11.86E-4.*(y(1)-302.8)+18.84E-4.*(y(2)-y(1))^1.27)/(y(2)+y(1)).^0.31+5.37E-12.*(y(2)^4-y(1).^(4));
Ending with the following error
Unable to perform assignment because the indices on the left side are not compatible with the size of the right
side.
Error in Untitled2 (line 2)
y(1)=302.6:0.005:332.3;
I suspect I know a bit of what's going wrong.. yet I'm at a loss for how to fix it.. Any help is much appreciated
Respuestas (1)
KALYAN ACHARJYA
el 18 de Jul. de 2019
Editada: KALYAN ACHARJYA
el 18 de Jul. de 2019
You can't do that-
y(1)=302.6:0.0055:332.3;
y(1) refering a y array with index postion 1, how can you save multiple values on single array location?
Same can be allowed if you define cell array y{1}
See example
#Allowed
>> s(2)=5
s =
0 5
#Not Allowed
>> s(2)=1:1:5
In an assignment A(:) = B, the number of elements in A and B must be the same
You can try with change the names of array variables as y1 and y2
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!