About 24,300,000 results
Open links in new tab
  1. How to convert all array values into negative ones? - MATLAB

    Jan 31, 2022 · I have an array A: A = [2; 3; 5; -8; 9; 1; -1] how do I convert it into an array whose values are all negative? So as to obtain B: A = [-2; -3; -5; -8; -9; -1; -1] Thanks!

  2. Matlab - replacing all negative and positive values

    Apr 19, 2013 · If I have an array of positive and negative values, how do I only keep the positive ones, and replace the negative ones by 0?

  3. How to replace negative elements in a Matrix with zeros? - MATLAB

    Now I am trying to set up a nested for loop to redefine negative elements in A. I need to replace negative elements in A with a zero. How do I go about doing this?

  4. How to change the values of an Matrix (or array) to 1 and 0 for ...

    How to change the values of an Matrix (or array) to 1 and 0 for positive and negative values in MATLAB? In this video it shows the code to change the values in a matrix to 1 and 0. It …

  5. How to convert all array values into negative ones? - MATLAB

    Jan 31, 2022 · I have an array A: A = [2; 3; 5; -8; 9; 1; -1] how do I convert it into an array whose values are all negative? So as to obtain B: A = [-2; -3; -5; -8; -9; -1; -1] Thanks!

  6. How to make all negative values in a matrix 0? - MATLAB

    Nov 18, 2020 · To set set negative values in a certain column of matrix "A" to 0, you can do this: For this example we assume A is a 2-D number matrix and that we are getting rid of negative …

  7. Detect where an array becomes negative - MATLAB Answers

    Jul 25, 2016 · I have an array of size 401 x 381 which has positive and negative values. I would like to detect which row in each column this change of sign occurs for the purposes of …

  8. MATLAB - replace zeros in matrix with small number

    Jun 5, 2013 · Is there a way to quickly replace zero elements in a matrix with a input of my choice. Quickly - meaning, without a loop. The direct answer is: which does exactly what you ask for, …

  9. How to assign negative and positive values to specific numbers in array ...

    Oct 20, 2017 · I need all negative numbers to be positive and all positive numbers to be negative. Sign needs to flip after the zero in the middle of the array.

  10. Exchanging negative values in a matrix with 0 - MATLAB Answers - MATLAB ...

    Dec 28, 2016 · Exchanging negative values in a matrix with 0. Learn more about negative values, zeors, replacing.

  11. Some results have been removed
Refresh