Match 2 vectors
Mostrar comentarios más antiguos
Hello everyone,
I have 3 vectors as follow:
A) Vvect = ones(1,251)';
B) Yvect = (V -((1-tau)*coupon/r) + ((1-tau)*coupon/r-sd)*(V/sd)^- x)*ones(251,1);
C) Evect = [1,2,3,4...241] (exogenous numbers)
I want to match vector C) and B) by changing vector A). I would like to iterate this and doing this for all 1 to 251 and save this into my vector Vvect. I don't knwo the command to match these 2 vectors with A) and also don't know how to loop this command.
Thank you for your help,
1 comentario
Alan
el 30 de Mzo. de 2011
Respuestas (1)
Walter Roberson
el 30 de Mzo. de 2011
I don't understand what you would be looping over?
What you write looks to me that you want
Vvect = Evect ./ Yvect;
Ah, your amendment just came through and now I'm more confused about what you want!
3 comentarios
Alan
el 30 de Mzo. de 2011
Walter Roberson
el 30 de Mzo. de 2011
You have an extra ) in that SV expression.
What are some typical values for x ? If x is a positive integer then you get a polynomial of order x+1; if x is a negative integer then you get a polynomial of order x.
Alan
el 30 de Mzo. de 2011
Categorías
Más información sobre Performance and Memory 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!