| MATLAB Central > MATLAB Newsreader > vectors |
|
|
|
I have a random vector A=[ 2 3 1 4 3 1...]. I need to create a new vector like this: |
|
"Konst " <konstance1@hotmail.com> wrote in message <ijc0ar$i33$1@fred.mathworks.com>... |
|
It returns errors about missing operators and when i Try to correct them it return an error that function wasn't found(????).Thanks though. I'll try it again. |
|
"Konst " <konstance1@hotmail.com> wrote in message <ijc0ar$i33$1@fred.mathworks.com>... |
|
An old-fashioned approach: |
|
I had my order of ops wrong to handle the general case to include zeros in A. |
|
"Matt Fig" wrote in message <ijc4c7$d1i$1@fred.mathworks.com>... |
|
% A slightly different method |
|
|
|
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <ijc6n8$h5d$1@fred.mathworks.com>... |
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
