Error with vpasolve - 'Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.'

2 vues (au cours des 30 derniers jours)
Hi,
I am having an issue with the vpa solve with the above stated error.
z=-1.82085;
T.ci=2.954735961685622e+02;
del.eff=(params.Dci-params.Dfo)/2; % m
epsilon.f=1;
epsilon.c=1;
params.Le=4; % m
params.qmax=38E3; %W m^-1
params.Dci=8.4E-3; % m
params.Dfo=8.3E-3; % m
R.ci=params.Dci/2;
R.fo=params.Dfo/2;
R.g=(R.fo+R.ci)/2;
qp.i1=params.qmax*cos(pi*z(i)/params.Le);
syms Tfo
Tci=T.ci(i)+273.15; %Kelvin
k.gas=15.8E-4*((Tfo+Tci)/2)^.79;
qpp.i1=qp.i1/(2*pi*R.g);
int_term=5.67E-8/(epsilon.f^-1+epsilon.c^-1-1);
htc_g.open=k.gas/del.eff+int_term*(Tfo^4-Tci^4)/(Tfo-Tci);
T.fo(i)=vpasolve(qpp.i1/(Tfo-Tci)==htc_g.open,Tfo)-273.15;
T.fo(i) should be something around 336.7, thank you

Réponses (1)

Srivardhan Gadila
Srivardhan Gadila le 16 Nov 2021
As the error message suggests, somewhere in your code, where the error appears, you are incorrectly indexing the variable on the LHS (left side) or assigning value from RHS (right side) which has different/incompatible size.
You can check the following page for Answers related to similar issue: Help Center - MathWorks. You can debug the issue by Setting Breakpoints on the line which is causing the error in your main code file.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by