matrix decision
3 views (last 30 days)
Show older comments
I'm trying to write a simple code, but I get error "Error Using==> mldivide" "Matrix dimensions must agree".....
what am i doing wrong?:
d=1000:1:20000;
y1=14400/d;%estimation
y2=(0.0001759/(d^2))*(2-2*cos(9046/d));%exact
plot(d,y1,'r');
hold on;
plot(d,y2);
0 Comments
Accepted Answer
David Young
on 21 Mar 2012
I think you need
y1=14400./d;%estimation
y2=(0.0001759./(d.^2)).*(2-2*cos(9046./d));
but I see this gives a very big difference between y1 and y2 so I'm not sure if it's entirely right.
More Answers (0)
See Also
Categories
Find more on Logical 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!