Clear Filters
Clear Filters

Unable to perform assignment because the left and right sides have a different number of elements

2 views (last 30 days)
Hi,
Please i keep getting the above error when i try to run the below code. Please can someone assist. Thanks
x=[1680 1190 841 595 420 297 210 149 105 74.4 52.5 37.2 26.3 18.6 13.1 9.29 6.57 4.65 3.28 ...
2.32 1.64 1.16 0.821 0.581 0.00];
y=[99.872 98.945 95.538 88.050 76.599 62.936 49.281 37.107 27.087 19.425 13.696 9.996 7.296 5.325 ...
3.886 2.837 2.070 1.511 1.103 0.805 0.588 0.429 0.313 0.228 0.000];
a=3.79; b=3.31; c=0.36; d=0.54; f=1.11; g=0.24;Dc=0.5; h=1.5; Di=0.1; Do=0.083; Du=0.058; H=3; fi=0.198;
S=a*(Du/Do)^6*(Du^2+Do^2)^c*h^d*exp(0.54*fi)/(Dc^f*H^g);
F=50;
Rv=S/(S+1);
a1=2.69*10^3; b1=0.46; c1=0.6; d1=1.21; f1=0.71; g1=0.38; i1=0.45; ps=1841.525; pf=1000; Q=0.09352;
d50c=a1*Dc^b1*Di^c1*Do^d1*exp(6.3*fi)/(Du^f1*h^g1*Q^i1*(ps-pf)^0.5);
a2=2.96; b2=0.15;
lambda=a2*(Dc^2*h/Q)^b2*exp(-1.58*Rv);
x1=x./d50c;
edp=1-exp(-0.693.*x1.^lambda);
syms x y
summation=symsum(edp.*y/100*F);
Rf=(Rv-fi)*summation;
alpha=Rf;
cdp=alpha+(1-alpha).*edp;
Rs=symsum(cdp.*y./100*F);
pio=(1-cdp*y*F)./(symsum((1-cdp.*y*F)));
piu=(cdp*y*F)./(symsum((cdp.*y*F)));
ezplot(Rs);

Answers (1)

Rashed Mohammed
Rashed Mohammed on 1 Mar 2021
Usage of ezplot function is not recommended. Please use fplot function. If you have a usecase which fplot or fimplicit functions do not satisfy and have to use ezplot, please share with us so that we can help you.
Hope this helps.

Categories

Find more on Particle & Nuclear Physics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!