Create x and y vectors?
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Tyler Bodnarik
am 18 Nov. 2020
Bearbeitet: Les Beckham
am 18 Nov. 2020
How can I build an x and y vector given x(1) = 1 and y (1) = 1 (first data points), dx and dy = 2, and number of rows(total number of y values) and number of columns(total number of x values)? These vectors will be used along with a matrix of data points to plot a graph.
0 Kommentare
Akzeptierte Antwort
Les Beckham
am 18 Nov. 2020
Bearbeitet: Les Beckham
am 18 Nov. 2020
Try this:
delta = 2; % dx, dy increment
N = 10; % desired number of points
x = 1:delta:delta*N;
y = 1:delta:delta*N'; % transpose y so that it is a column vector
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!