why I get error when Start my code with %?

%% Section 1
%
ka=0.8;
Am=1;
fm=2;
t=0:0.001:1;
mt=Am*sin(2*pi*fm*t);
Ac=2;
fc=50;
ct=Ac*cos(2*pi*fc*t);
St=(1+ka.*mt).*ct;
subplot (3, 1, 1)

回答 (1 件)

John D'Errico
John D'Errico 2022 年 12 月 25 日

0 投票

%% Section 1
%
ka=0.8;
Am=1;
fm=2;
t=0:0.001:1;
mt=Am*sin(2*pi*fm*t);
Ac=2;
fc=50;
ct=Ac*cos(2*pi*fc*t);
St=(1+ka.*mt).*ct;
subplot (3, 1, 1)
As you can see, there is no error. You have not plotted anything yet.
If you got an error, then show what you got, and say why you are confused about what you see.

質問済み:

2022 年 12 月 25 日

回答済み:

2022 年 12 月 25 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by