Plotting elements of an array
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have an array and I would like to plot the number 1 against the value of the first element, 2 against the value of the second element, and so on, up to the final element which is the 40,000th element.
How do I go about doing this?
0 Commenti
Risposte (1)
Star Strider
il 30 Gen 2015
My approach:
y = randi(10, 4E+4, 1); % Simulated Data
x = 1:length(y); % ‘x’ (Independent) Variable
figure(1) % Plot
plot(x, y)
grid
0 Commenti
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!