Creating a plot where my x and y values are defines by equations of another variable
40 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
the cyclist
il 2 Dic 2021
Modificato: the cyclist
il 2 Dic 2021
Here is a simple example.
z = 1:10;
x = 2.*z;
y = 3.*z;
figure
plot(x,y)
xlabel('x')
ylabel('y')
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!