Generate data points and file from written program

t = linspace(0, 3, 200);
i = 6 * cos((2 * pi * t) -15);
v = 12 * sin((2 * pi * t) - 45);
plot(t, i);
hold on;
plot(t, v);
xlabel('t');
ylabel('v(t) & i(t)');
hold off;
Use this program to generate data points and file for plotting i(t) versus v(t)

回答 (1 件)

Star Strider
Star Strider 2018 年 1 月 28 日

0 投票

‘Use this program to generate data points and file for plotting i(t) versus v(t)’
The instruction for the plot is clear:
figure
plot(v, i)
grid
xlabel('v(t)')
ylabel('i(t)')
axis equal
I have no idea what the file is supposed to contain. It could be the ‘v’ and ‘i’ data, the image file for the plot, or something else. See the relevant documentation on saving data and images to files.

カテゴリ

ヘルプ センター および File ExchangeDiscrete Data Plots についてさらに検索

質問済み:

2018 年 1 月 28 日

回答済み:

2018 年 1 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by