About 2,450,000 results
Open links in new tab
  1. arrayfun - Apply function to each element of array - MATLAB

    B = arrayfun(func,A) applies the function func to the elements of A, one element at a time. arrayfun then concatenates the outputs from func into the output array B, so that for the ith …

  2. How do I create an array of a function output? - MATLAB

    Feb 25, 2018 · How do I create an array of a function output? Each attempt I've tried it overwrites the value in the array and returns a 1x1 array with the final value calculated as it's value. I've …

  3. Matrices and Arrays - MATLAB & Simulink - MathWorks

    Aug 7, 2010 · Matrix and Array Operations. MATLAB allows you to process all of the values in a matrix using a single arithmetic operator or function.

  4. how to use an array as the input variable for function

    Jul 20, 2022 · I would like to use an array as the input to call the main function. how to make it? E.g function [a b c]=myfunc( x1,x2,x3,x4, ...xn) a=x1+x2; b=a; c=x1*x2*x3...xn; end Now I want …

  5. function - Declare function name, inputs, and outputs - MATLAB

    function [y1,...,yN] = myfun(x1,...,xM) declares a function named myfun that accepts inputs x1,...,xM and returns outputs y1,...,yN. This declaration statement must be the first executable …

  6. MATLAB cell array of function handles - How does it work?

    Aug 31, 2016 · You can then iterate over your cell array by accessing the function you want by calcCellFunc{idx} where idx is the element you want in the cell array. This will ultimately give …

  7. Chapter 08: MATLAB Scripting and Arrays - Engineering LibreTexts

    May 8, 2023 · Create arrays using all 1’s and all 0’s using the ones() and zeros() functions. How to use the transpose operator ’. How to address arrays and access the values they contain.

  8. 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 …

  9. MATLAB Array Functions - Online Tutorials Library

    Array functions are a fundamental aspect of MATLAB, as they allow you to perform operations on arrays (also known as matrices) efficiently. Let us take a look at all these array functions listed …

  10. matlab - How to create array from a function? - Stack Overflow

    Apr 28, 2015 · for ii=1:length(gdp_p_h) entry=gdp_p_h(ii); function_array(end + 1) = polyval(p,entry); end Else, if that's the only thing you are doing inside the loop, you just dont …

  11. Some results have been removed
Refresh