Having difficulty in plotting the frequency components of x1, x2, x3,x4 from a mat lab file

5 ビュー (過去 30 日間)
Hailey
Hailey 2024 年 3 月 16 日
回答済み: Ishu 2024 年 4 月 3 日
Here is the data from the matlab file the x1, x2, x3, and x4 signal are one column
  1 件のコメント
Dyuman Joshi
Dyuman Joshi 2024 年 3 月 16 日
"Having difficulty in plotting the frequency components of x1, x2, x3,x4 from a mat lab file"
What is the difficulty?

サインインしてコメントする。

回答 (1 件)

Ishu
Ishu 2024 年 4 月 3 日
Hi Hailey,
I understand that you are getting difficulty in plotting 2D graphs in MATLAB. And from the given data I am assuming that you want to plot x1, x2, x3, x4 against t and to plot all these on same graph you can use "hold on" and "hold off".
% you can use your own data
t = linspace(1, 100, 10);
x1 = linspace(1, 10, 10);
x2 = linspace(11, 20, 10);
x3 = linspace(21, 30, 10);
x4 = linspace(31, 40, 10);
plot(t,x1);
hold on
plot(t,x2);
plot(t,x3);
plot(t,x4);
hold off
For more information on plots you can refer below documentation:
Hope it helps!

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by