Mostrar comentarios más antiguos
hi,
how do i replace all the members of an array with with anoda set of arrays.. for example
a = [ q1 q2 q3 q4]
b = [1 2 3 4 2 4 3 1 2 1 3 4 3 2 1 2 3 4 1 3 2 4]
how do i replace the members of a with where q1=1, q2=2, q3=3 and q4=4 pls i will appreciate any help i can get for this.
thanks in advance
4 comentarios
Sven
el 15 de Nov. de 2011
Select the code in your post and hit the "code" button to make it easier to read.
One problem we will all have is that your first statement:
a = [ q1 q2 q3 q4]
is not valid MATLAB code, so I don't quite understand what you're trying to do... can you clarify?
Fangjun Jiang
el 15 de Nov. de 2011
What does b have anything to do with this?
deji
el 15 de Nov. de 2011
Dr. Seis
el 15 de Nov. de 2011
Ah, then use my last suggestion if you are using the elements in b for indexing.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!