About 6,730,000 results
Open links in new tab
  1. How can I index a MATLAB array returned by a function without …

    However, MATLAB complains about Unbalanced or unexpected parenthesis or bracket on the first parenthesis before the 3. Is it possible to read values from an array/matrix without first …

  2. matlab - What is a function handle and how is it useful ... - Stack ...

    Apr 28, 2009 · The function handle operator in MATLAB acts essentially like a pointer to a specific instance of a function. Some of the other answers have discussed a few of its uses, but I'll add …

  3. How to fix 'Undefined Function or Variable' in matlab?

    There are multiple approaches passing constants to MATLAB functions Defining variables as global is a simple solution. Using global makes the variable "visible" to all functions and …

  4. How do I set default values for functions parameters in MATLAB?

    Apr 28, 2009 · Is it possible to have default arguments in MATLAB? For instance, here: function wave(a, b, n, k, T, f, flag, fTrue=inline('0')) I would like to have the true solution be an optional …

  5. math - Optional args in MATLAB functions - Stack Overflow

    Jul 20, 2011 · How can I declare function in MATLAB with optional arguments? For example: function [a] = train(x, y, opt), where opt must be an optional argument.

  6. Matlab function return value - Stack Overflow

    You can return multiple outputs from a function with [x,y,z] = functionname(...). Or you can combine all outputs into a cell array or a structure. Read the documentation, it's clearly …

  7. How can I apply a function to every row/column of a matrix in …

    May 5, 2017 · You can apply a function to every item in a vector by saying, for example, v + 1, or you can use the function arrayfun. How can I do it for every row/column of a matrix without …

  8. Size function in matlab - Stack Overflow

    As you know, matlab deals mainly with matrices. So, the size function gives you the dimension of a matrix depending on how you use it. For example: 1. If you say size(A), it will give you a …

  9. Passing vector input into MATLAB function - Stack Overflow

    To call the function, including whatever number you like, you can enter on the Matlab command window (for example), myFunction([1 2 3],[4 5 6],[7 8 9]) and the code in your function will be …

  10. How to call a function placed in another directory in Matlab?

    Jun 26, 2016 · It is becoming very challenging to understand the whole code. I was thinking that if I can put some scripts in another folder, it will become very straightforward to understand and …