How do I scatter twice on the same graph?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I have 2 vectors with numbers: velocity(815x1) and velocityTimes(815x1). Velocity is calculated, among the other parameters, with a variable N which also changes the way it looks when scattered.
I need to scatter velocity and velocityTimes once, change N, and then on the same graph scatter it again with the new N.
However I can't seem to get it right.
What I'm trying to do is this:
n = 2
figure(1)
scatter(velocityTimes,velocity)
hold on
n = 150
scatter(velocityTimes,velocity)
But it only scatters the first one, with n=2. How do I fix it?
Thanks very much in advance!
7 Kommentare
Walter Roberson
am 17 Aug. 2024
The number of elements in x and y must match the number of elements in sz (with some exceptions for the case of matrix x and y and vector sz.)
If back_azm_ev2_error matches the size of time_vector_ev2 for the first call, then it is not going to match the size of time_vector_ev1 for the second call, but you used back_azm_ev2_error as the sz for both calls.
Guilherme de Melo
am 17 Aug. 2024
Yes, that was the so simple problem that I did not see. thank you very much
Antworten (1)
Siehe auch
Kategorien
Mehr zu Scatter 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!