Creating a plot where my x and y values are defines by equations of another variable
36 views (last 30 days)
Show older comments
Hopefully a simple enough problem to solve, and possibly just something obvious which slipped my mind. I have a pair of equations and want to plot their outputs such that equation 1 gives my x values and equation 2 gives my y values. Both have the same number of points, as both take in the same variable to generate their values, so there shouldn't be any discrepency there.
Thank you!
0 Comments
Answers (1)
the cyclist
on 2 Dec 2021
Edited: the cyclist
on 2 Dec 2021
Here is a simple example.
z = 1:10;
x = 2.*z;
y = 3.*z;
figure
plot(x,y)
xlabel('x')
ylabel('y')
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!