MATLAB: How to make the values become positive arraymeanpositivevalues I have array values and I need to know which command I should use to make my values become positive and how can I find the mean of all array values? Thanks. Best Answer % Example: 3x2 array myArray = [-1,-2;-3,2;-3,-4]; % Make all values in array positive myArray = abs(myArray);% Mean value of arraym = mean(myArray) % m returns a row vector where each column is the mean of each column of your array% If you want a single mean value for all values of your array% concatenate values in a single rowarray = [myArray(:,1); myArray(:,2)];m_all = mean(array);for more info: https://es.mathworks.com/help/matlab/ref/mean.html Related SolutionsMATLAB: Mean value of a matrix subarray mean(A(4000:5000,3,2)) MATLAB: How to check if symbolic expression is positive Use the isAlways (link) function.Since you have your complete code and we do not, I will defer to you to evaluate it. Related QuestionThe mean of a subset of dataStandard deviation array doubleLateral Control Tutorial: Why is the variable ‘CurvedSteadyYaw’ positive
Best Answer