(no subject)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

Rajendra Marathe
I have a column matrix A(5000,1)
It has elements with values from 1 to 10
I wish to substitute the elements with value of 10 With value of 0 
Please let me know how I can implement this on octave
R V Marathe


Reply | Threaded
Open this post in threaded view
|

RE:

Tony Richardson

A(find(A == 10)) = 0;

 

Or, more directly using logical indexing,

 

A(A == 10) = 0;

 

Tony Richardson

 

From: Help-octave <help-octave-bounces+richardson=[hidden email]> On Behalf Of Rajendra Marathe
Sent: Friday, December 7, 2018 12:08 AM
To: [hidden email]
Subject:

 

I have a column matrix A(5000,1)

It has elements with values from 1 to 10

I wish to substitute the elements with value of 10 With value of 0 

Please let me know how I can implement this on octave

R V Marathe



Reply | Threaded
Open this post in threaded view
|

Re:

nrjank
On Fri, Dec 7, 2018 at 9:24 AM Richardson, Anthony <[hidden email]> wrote:

A(find(A == 10)) = 0;

 

Or, more directly using logical indexing,

 

A(A == 10) = 0;

 


different indexing schemes can be very powerful ways of manipulating and processing your data. I recommend you read:

and


Reply | Threaded
Open this post in threaded view
|

Re:

Rajendra Marathe
Thanks, I'll check it out. 

On 7 Dec 2018 8:17 pm, "Nicholas Jankowski" <[hidden email]> wrote:
On Fri, Dec 7, 2018 at 9:24 AM Richardson, Anthony <[hidden email]> wrote:

A(find(A == 10)) = 0;

 

Or, more directly using logical indexing,

 

A(A == 10) = 0;

 


different indexing schemes can be very powerful ways of manipulating and processing your data. I recommend you read:

and