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]=minimax(m) mmr=max(m')-min(m'); mmm=max(m,[],'all')-min(m,[],'all'); end or function [mmr,mmm]=minimax(...
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]=minimax(m) mmr=max(m')-min(m'); mmm=max(m,[],'all')-min(m,[],'all'); end or function [mmr,mmm]=minimax(...
4년 초과 전 | 1
답변 있음
if-statement with conditions.
function out=picker(condition,in1,in2) if condition==true out = in1; elseif condition==false out = in2; en...
if-statement with conditions.
function out=picker(condition,in1,in2) if condition==true out = in1; elseif condition==false out = in2; en...
4년 초과 전 | 1