This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
t = 0:0.1:16;
y1 = (-0.133i * sin(1.247i*t)) .* [-0.821; -0.571];
y2 = (-0.0975*cos(2.451*t)).*[-0.571; 0.821];
figure(1)
hold on
% Plot the first function (y1, first component) with a red line and label it
plot(t, y1, 'r', 'linewidth', 4, 'DisplayName', 'y1');
% Plot the second function (y2, first component) with a different color (e.g., green) and label it
plot(t, y2, 'g', 'linewidth', 4, 'DisplayName', 'y2');
% Customize the legend and add labels to the axes
legend('show', 'Location', 'best');
xlabel('Time (t)');
ylabel('Amplitude');
title('Function Plots');
I am not sure why it looks like this, and why it gives me 8 legends for only 2 functions, and I am almost certain it should be a sin/cos fuinction not this exponential.
Cheers
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/matlab/comm...