Parse error at ']'
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have been struggling with this code for a few days now, and I feel like I have tried everything to try and figure it out. I get a parse error after the double subs function every time! Please help
clear
i = [1.04,1.257,1.304,1.461,1.626];
di = 0.01;
r = [0.052,0.0485,0.0475,0.046,0.0415];
dr = 0.005;
v=300
dv=1
k = ((2)*((5/4)^3)*((0.15)^2))/((120*(4*pi*10^(-7))^2));
syms R I V dR dI dV
em = (k*V)/((I^2)*(R^2));
dEMdR=diff(EM,R);
dEMdI=diff(EM,I);
dEMdV=diff(EM,V);
dEM=sqrt((dEMdI*dI)^2+(dEMdR*dR)^2+(dEMdV*dV)^2)
dem=double(subs(dEM,[R,I,V,dR,dI,dV],[r,i,v.dr.di.dv.]))
Any help is appreciated, thanks!
0 Kommentare
Antworten (1)
James Tursa
am 19 Nov. 2020
Looks like you just need commas instead of periods. E.g.,
[r,i,v,dr,di,dv]
0 Kommentare
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!