How can I fill a vector with another one with different size?
Mostrar comentarios más antiguos
Hello
I want to fill a vector with another vector with different size. like bellow example, that "fullPath" is 201*1 and "xpath" size is 100*1.
fullPath(1:2:end)=2*(xpath(1:1:end));
I have this error : In an assignment A(I) = B, the number of elements in B and I must be the same.
Could you help me?
Thanks alot
Respuesta aceptada
Más respuestas (1)
Mendi
el 25 de Jul. de 2015
To find the error source run:
length(xpath(1:1:end)) %=100
length(fullPath(1:2:end)) %=101
So change the code to:
fullPath(1:2:end-1)=xpath(1:1:end);
Categorías
Más información sobre File Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!