Error "Matrix dimensions must agree" what should I fix?
1 view (last 30 days)
Show older comments
a = 0.25;
theta = 0;
r = [0:12];
x = (30/2)*((1-(a^2/r.^2))+(1+3*(a^4/r.^4)-4*(a^2/r.^2)*cos(2*theta)))
y = (30/2)*((1+(a^2/r.^2))-(1+3*(a^4/r.^4)*cos(2*theta)))
z = -(30/2)*((1-3*(a^4/r.^4)+2*(a^2/r.^2))*sin(2*theta))
figure(1)
plot(x)
figure(2)
plot(y)
figure(3)
plot(z)
1 Comment
Accepted Answer
KSSV
on 17 Mar 2016
Edited: Stephen23
on 17 Mar 2016
a = 0.25;
theta = 0;
r = [0:12];
x = (30/2)*((1-(a^2./r.^2))+(1+3*(a^4./r.^4)-4*(a^2./r.^2)*cos(2*theta))) ;
y = (30/2)*((1+(a^2./r.^2))-(1+3*(a^4./r.^4)*cos(2*theta))) ;
z = -(30/2)*((1-3*(a^4./r.^4)+2*(a^2./r.^2))*sin(2*theta)) ;
figure (1)
plot(x)
figure (2)
plot(y)
figure (3)
plot(z)
element by element division.
0 Comments
More Answers (0)
See Also
Categories
Find more on Annotations 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!