To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
hi, I need two outputs from function , the first one is matrix , and the other is one value. two calls for function , the first call need the matrix and the second call need value. how do that? I built fun. with two outputs: function [m,n]=d(any input); thanks in advance
No products are associated with this question.
Call the function twice and have the calling routine throw away the output that it does not need at the time.
Let's say your function will have a name myFunction. As I understood, you want to pass a parameter to this function and get two output variables from it.
To call the function you use the following syntax:
To build your own function crate a file->new, paste this code and save as a separate file:
function [ M n ] = myFunction(inputParameter)
The function will return matrix 'M' 10x10 of ones and 'n' will be your input scaled by 5.