Arooba Ijaz
Followers: 0 Following: 0
Feeds
已回答
Calculate taxi fare by giving multiple inputs and single output
function [fare] =taxi_fare (d,t) a=ceil(d) b=ceil(t) fare=(b*0.25)+((a-1)*2)+5 end
Calculate taxi fare by giving multiple inputs and single output
function [fare] =taxi_fare (d,t) a=ceil(d) b=ceil(t) fare=(b*0.25)+((a-1)*2)+5 end
4 years 前 | 0
已回答
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) %finding mmr a=M' b=max(a) c=min(a) mmr=b-c %finding mmm d=max(M) e=max(d) f=min(M) g=...
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) %finding mmr a=M' b=max(a) c=min(a) mmr=b-c %finding mmm d=max(M) e=max(d) f=min(M) g=...
4 years 前 | 1