Why is the message for my program Error using + Matrix dimensions must agree.??
Show older comments
Vf=zeros(numel(rn),numel(rn));
for c=1:numel(rn)
for b=1:Lc
Tnf(c)=(1/sqrt(rn(c).^2+(G+1-zn(c)).^2))-(1/sqrt(rn(c).^2+(G+1+zn(c)).^2));
W1nf(c,b)=log((Aj(b)+zn(c)+sqrt(rn(c).^2+(Aj(b)+zn(c)).^2))/(Aj(b)-zn(c)+sqrt(rn(c).^2+(Aj(b)-zn(c)).^2)));
Pijf= [W1nf,Tnf'];
Vf=Vf+Pijf.*Q1ij(j);
end
end
I have checked the size of the variables. they are matching.why this is showing error using plus?? Whether i have to set Vf to same dimensions..(j and rn is defined). Vf,Pijf,W1nf,Tnf are arrays...
Accepted Answer
More Answers (0)
Categories
Find more on Debugging and Improving Code 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!