Code for an equation
이전 댓글 표시
I want to plot y = (3.5^(-.5x))*cos(6x) for x= -2 to x= 4 with interval of 0.01 without using for loop.
Following is the code I am writing:
clc
x = [-2:.01:4];
y = (3.5.^(-.5*x))*(cos(6*x));
plot(x,y);
But I recieve this error
Error using *
Inner matrix dimensions must agree.
채택된 답변
추가 답변 (2개)
Adam Danz
2019년 7월 23일
y = (3.5.^(-.5*x)).*(cos(6*x));
% ^ dot
댓글 수: 7
Malik Sheraz Nazam
2019년 7월 23일
Adam Danz
2019년 7월 23일
There must be huge delays in server synchronization. There was 6 min between the first and second answer and one more minute for the 3rd. I certainly didn't see any answers prior to the quick 1-liner I posted. I wonder if madhan ravi saw any.
madhan ravi
2019년 7월 23일
편집: madhan ravi
2019년 7월 23일
As I noticed in the activity feed the answer you & I gave were at the same time, but yours were a millisecond quicker so yours came up first. The 6 mins was delta between mine and the accepted if it's what you mean.


Adam Danz
2019년 7월 23일
The time stamps on the recent activity feed shows 15:14 (Moos' answer), 15:09 (for our ans'). I'm not sure how you're measuring milliseconds. Accepted answer at 15:16. In any case, I certainly did not see an answer despite the ~7min following the first answer.
madhan ravi
2019년 7월 23일
We are saying the same point in fact :)
Malik Sheraz Nazam
2019년 7월 26일
카테고리
도움말 센터 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!