![photo](/responsive_image/150/150/0/0/0/cache/matlabcentral/profiles/9568803_1530788404664_DEF.jpg)
Akinola Tomiwa
Followers: 0 Following: 0
Feeds
已回答
Write a function called minimax that takes M, a matrix input argument and returns mmr, a row vector containing the absolute values of the difference between the maximum and minimum valued elements in each row. As a second output argument called mmm,
Function [mmr, mmm] = minmax(x) mmr = (max(x, [], 2) - min(x, [], 2)'; %the prime converts it to a row matrix ...
Write a function called minimax that takes M, a matrix input argument and returns mmr, a row vector containing the absolute values of the difference between the maximum and minimum valued elements in each row. As a second output argument called mmm,
Function [mmr, mmm] = minmax(x) mmr = (max(x, [], 2) - min(x, [], 2)'; %the prime converts it to a row matrix ...
4 years 前 | 0