Azzera filtri
Azzera filtri

Merging vectors and plotting

3 visualizzazioni (ultimi 30 giorni)
T
T il 5 Set 2013
Suppose you have the following time vectors in seconds:
A =
0
1
2
3
4
5
6
7
8
9
10
and
B =
3.1
3.6
3.7
4.1
4.3
4.6
4.8
5.1
5.4
5.8
6.7
6.8
6.8
Can one merge A and B to establish one time vector? What if there are values associated with each element in A and B? Or does one have to plot each separetly using plotyy?

Risposta accettata

Walter Roberson
Walter Roberson il 5 Set 2013
unique([A;B])
  16 Commenti
Walter Roberson
Walter Roberson il 8 Set 2013
Unless your vectors are much longer than you show, the easiest thing would be to re-run the B portion of above after adding the new time and value to the Btimes and Bvals. If the new time is after all of the old times, the easiest thing to do is rerun all of the above.
T
T il 8 Set 2013
Yes you're right thanks.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Two y-axis in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by