About 12,600,000 results
Open links in new tab
  1. 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 scripts. The downside …

  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 do I make a function from a symbolic expression in MATLAB?

    Oct 24, 2016 · The pseudo-code you're already written will translate almost directly into lines of Matlab. As I read it your function f () is a function only of the variable beta since you indicate that n1,n2,m …

  4. How can I index a MATLAB array returned by a function without first ...

    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 assigning it to …

  5. Size function in matlab - Stack Overflow

    Dec 25, 2011 · 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 …

  6. How to use `feedback` function in Matlab? - Stack Overflow

    Feb 9, 2020 · 2 Matlab's feedback function is used to obtain the closed loop transfer function of a system. Example: sys = feedback(sys1,sys2) returns a model object sys for the negative feedback …

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

    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 using a for loop?

  8. Matlab function return value - Stack Overflow

    function result = functionA(N,alpha) result = 5; return end The second part is to create another Matlab file (i.e. upto you to name it) or you can use the Matlab command window even. Then run the …

  9. return multiple output variables from Matlab function

    Jan 22, 2015 · Matlab function outputs are in cell format, so you can define a cell data with the size same as the function output and use it as a single variable to store all the outputs in a more …

  10. Use varargin for multiple arguments with default values in MATLAB

    Mar 15, 2021 · Arguments go in order. If you give 2 arguments, then the function has arguments 1 and 2 defined. Options are to pass an empty array for unused args, check to see how many arguments are …