About 460,000 results
Open links in new tab
  1. how to use an array as the input variable for function

    Jul 20, 2022 · Most likely you should rewrite the function to accept vector/array inputs, rather than lots and lots of separately-named input arguments. Most likely that would make your code …

  2. mat - Matlab pass array as function parameter - Stack Overflow

    Pass contents of cell array as individual input arguments to a function in MATLAB

  3. input - Request user input - MATLAB - MathWorks

    This MATLAB function displays the text in prompt and waits for the user to input a value and press the Return key.

  4. Passing array as input to a function - MATLAB Answers

    Aug 23, 2023 · Hi, im trying to pass the following arrays into the self created function DrawRegularPolygon but Matlab is prompting me matrix dimension errors. Can someone help. …

  5. matlab - input and arrays - Stack Overflow

    Oct 2, 2012 · evalResponse = input(prompt) displays the prompt string on the screen, waits for input from the keyboard, evaluates any expressions in the input, and returns the value in …

  6. Matlab function with array input problem - Mathematics Stack Exchange

    Jun 28, 2017 · Use elementwise arithmetic operations (.* and .^) to apply the same function to all elements of a vector at once. Without the dot, it interprets * as dot product and ^ as matrix …

  7. Passing array as an input argument - MATLAB Answers

    Oct 6, 2019 · I want to pass an array [p1 p2 p3] in the function "arithmetic_decoding" as an input.

  8. How to use the values of an array as inputs for a function?

    Sep 4, 2022 · outputs=arrayfun (@ (i) getJEVesselSpectrum (c (i,1),c (i, (2),c (i, (3),c (i, (4),c (i, (5),c (i, (6)), [1:size (c,1)].'); This is the same thing as an explict for..end loop over the rows of …

  9. How to declare a function with an argument which is an array?

    Oct 7, 2011 · However, you don't need to declare the type of input in matlab. Just give it a name, and then use it. So, the proper syntax for a declaration would be: I need to declare a function …

  10. Passing array as input to a function - MATLAB Answers

    Aug 23, 2023 · You can use a for loop to make regularly-spaced vectors corresponding to each element of inputs, and since number of elements of the generated vector will vary, use a cell …

  11. Some results have been removed
Refresh