Filter löschen
Filter löschen

Merging vectors and plotting

3 Ansichten (letzte 30 Tage)
T
T am 5 Sep. 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?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 5 Sep. 2013
unique([A;B])
  16 Kommentare
Walter Roberson
Walter Roberson am 8 Sep. 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 am 8 Sep. 2013
Yes you're right thanks.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Two y-axis finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by