mardi 10 mars 2015

MatLab Creating a Function that takes inputs and Generates a Random Matrix of dimensions of the largest input

"Create a function in an m-file that takes inputs “x” and “z” and generates any random matrix of dimension “x” or “z”, whichever is larger"


function m= myFunction(x,z)


t =0:pi/100:2*pi ;


if x>z linalg:randomMatrix(x,x); else linalg::randomMatrix(z,z); end


Is what I have? How can I make this work??





1 commentaire:

  1. Request an input prompt from the user, the use if else to complete the statement

    RépondreSupprimer