From: kev on 10 Jun 2010 07:12 Hi - I'm sure this is a question that has been asked before but I can't seem to find a solution so sorry if this is a repeat question... I'm trying to search a vector for negative values and replace them with a non zero value I have found the x(x<0) =0; command which replaces all negative values with zeros. What I want is something like... x(x<0)=x+360; Unfortunately this adds 360 to the index of x not to the value of x Could anyone advise me on this?
|
Pages: 1 Prev: waitfor and user defined classess Next: Replace Negative values with Non-zero values |