About 66,200 results
Open links in new tab
  1. syntax - What is the @ operator (at sign) in MATLAB? - Stack …

    Jan 20, 2010 · The @ operator creates a function handle, something that allows you to easily create and pass around a function call like a variable. It has many nice features, none of which …

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

    May 16, 2017 · A neat thing about a function handle is you can define it on the fly. Minimize the function cos(x), over the interval [0,2*pi]? xmin = fminbnd(@(x) cos(x),0,2*pi) xmin = …

  3. MATLAB | Invalid syntax for calling function 'cond' on the path.

    Nov 19, 2021 · cond() is the name of a built-in function. Matlab tolerates variables whose names collide with functions, but it can result in weird things like this. In the line that produces the …

  4. Matlab Calling Functions without parentheses - Stack Overflow

    Jul 21, 2017 · When calling mcc as you suggest in the question, the tooltip shows you can in fact use function syntax, despite the documentation being entirely shown using command syntax. …

  5. Matlab function return value - Stack Overflow

    The first part is to create a function called 'functionA' in a filename 'functionA.m'. Then put the following code inside: function result = functionA(N,alpha) result = 5; return end The second …

  6. Is there a standard for writing the beginning comments of a …

    While there is no strict standard for the contents of the beginning comments of your functions (i.e. the "Help text"), there are some specific things you should know about their format that …

  7. Parse error at ' [' : usage might be invalid MATLAB syntax

    Jan 5, 2020 · thanks for reading the question. that solved the problem. The reason why I am doing that way is because the MATLAB function numjac requires all the necessary arguments …

  8. What's the difference between & and && in MATLAB?

    Sep 4, 2009 · For example (pardon my syntax). If.. A = [True True False True] B = False A & B = [False False False False] ..or.. B = True A & B = [True True False True] For &&, the right …

  9. How can I index a MATLAB array returned by a function without …

    That being said, you also have to include these function definitions somewhere. I personally have made them independent functions in my path, because they are super useful. These functions …

  10. How to execute multiple statements in a MATLAB anonymous …

    Feb 14, 2017 · The anonymous function syntax in Matlab (like some other languages) only allows a single expression. Furthermore, it has different variable binding semantics (variables which …

Refresh