Error using * Inner matrix dimensions must agree? It also shows an error for Y, but I can't figure out what it is?
Show older comments
w = 3;
t = 0:1:8;
Y = (t*sqrt(t.^2+w^2))+((w^2)*log((t+sqrt(t.^2+w^2))/w));
P2 = 1-((w^2)/(t^.2+w^2))*cos(Y)*cos(Y);
plot(t, P2)
The equation that I am trying to plot are highlighted in blue.
Please Help.

1 Comment
per isakson
on 21 Apr 2017
Accepted Answer
More Answers (1)
Greg Dionne
on 21 Apr 2017
0 votes
It looks like you want to use ".*" instead of "*" and "./" instead of "/".
1 Comment
Blaz Serna
on 21 Apr 2017
Categories
Find more on Matrix Indexing 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!