| MATLAB Central > MATLAB Newsreader > Help with insertion |
|
|
|
Hey guys I need help here, |
|
"Diego Zegarra" <diegozbb@gmail.com> wrote in message <greaei$ki5$1@fred.mathworks.com>... |
|
I am selecting the job j1 and want to insert it in every possible position of row i1 in sol1. So those 5 options are the ones I should come up with. How can I do that? |
|
This is quick and easy to do with a little for loop. As Roger said, you are not randomly selecting an element with your formula (I correct Roger's error below.). |
|
Into all different positions, by that I mean |
|
Thanks a lot Matt, that works like a charm. Now what if instead of just inserting that value into row i1 you do it to every position in every row, |
|
"Diego Zegarra" <diegozbb@gmail.com> wrote in message |
|
One of many solutions, but this one is vectorized |
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
Contact us at files@mathworks.com
