How to plot basic signal
古いコメントを表示
So I am trying to plot basic signals in MATLAB for an assignment, and I am wondering how to do so. For example how would I plot a signal such as "plot x1(t)=u(t+1)-u(t-5) where -7 < t < 7seconds"
2 件のコメント
Jaya
2022 年 3 月 7 日
Good that you admit it is an assignment question. That's why can you first please show whatever code you have tried to attempt? Then, it is ok for people to correct your code to guide you.
Isaiah Moore
2022 年 3 月 8 日
編集済み: Isaiah Moore
2022 年 3 月 8 日
回答 (1 件)
Image Analyst
2022 年 3 月 8 日
After your code, try limiting the x axis to -7 to 7
xlim([-7, 7]);
Or you can use a numerical example - not syms. Like
numElements = 1000;
t = linspace(-7, 7, numElements);
% Compute l(t) then plot % You can do this line yourself.
plot(t, l, 'LineWidth', 2);
xlabel('t')
ylabel('l(t)');
grid on;
カテゴリ
ヘルプ センター および File Exchange で Spline Postprocessing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!