Borrar filtros
Borrar filtros

Merging vectors and plotting

3 visualizaciones (últimos 30 días)
T
T el 5 de Sept. de 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?

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Two y-axis en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by