how to create a 1xn matrix from a loop
Mostrar comentarios más antiguos
sir, my problem is i want to assign power values to 50 nodes.i m initializing first node power value as 1000.i have written the code like below.
p1=1000; for j=2:k pj=p1+j*100; j=j+1; end
here i have taken k as total no of nodes.j is the node no.i.e, traversing from first node to kth node.pj expression i have taken on my own to assign different values to different nodes.my problem is i m getting the result as a single value and i want to express it in a 1xn matrix form.i m new to matlab.its urgent for doing my project.pllllzzz help me..i want a urgent reply. Expecting a favorable reply. Thanking u SUCHI.
1 comentario
Walter Roberson
el 14 de Mayo de 2011
What is your intention when you try to modify j within the "for" loop that is running over the variable j ? Are you trying to proceed by 2's for example?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre WLAN Toolbox 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!