About 5,830,000 results
Open links in new tab
  1. disp - MathWorks

    Here are three ways to display multiple variable values on the same line in the Command Window. Concatenate multiple character vectors together using the [] operator. Convert any numeric values to characters using the num2str function. Use disp to display the result.

  2. How do I return multiple array values? - MATLAB Answers

    Aug 31, 2019 · After finding neutral axis depth "c" for each strain value (ec = 0 : 0.0038), I calculate the curvature and moment values and, finally plot this kind of behaviour. There would be tons of iteration if its desired to have more consistent values.

  3. MATLAB - multiple return values from a function?

    Nov 15, 2010 · Matlab allows you to return multiple values as well as receive them inline. When you call it, receive individual variables inline: [array, listp, freep] = initialize(size)

  4. Displaying multiple values separately - MATLAB Answers

    Sep 19, 2018 · Displaying multiple values separately. Learn more about display, fprintf Hello all, I have a code which calculates 2 values,one for a1=1217 and the other is for a2=-845.42.

  5. How to display multiple variables of matrix and array using a …

    May 23, 2017 · Use display command or fprintf to display the above 9 variables. disp(a), disp(b), ... maybe? I'm not sure this is what you wanted, but this line will display all your workspace variables values: cellfun(@eval,who);. If you have a lot of and/or large variables it will take a while... Question is not specific enough.

  6. How to Use disp() Function with Variables in MATLAB?

    Dec 27, 2023 · The disp() function in MATLAB provides a simple yet flexible way to print variable values for visibility. This article will explore how to use disp() to display scalars, vectors, matrices, strings and more in MATLAB.

  7. Get values of elements at specific indices in a matlab matrix

    Feb 11, 2014 · I was wondering if there is a quick way in matlab (pretty sure there is and I just don't know it!) to get all the values of an array at specific indices. Example: If I have an array: a = [1,3,5,7,9]

  8. How to Return Multiple Values From a Matlab Function

    Feb 26, 2025 · Discover how to return multiple values from a MATLAB function using box brackets, structures, and cell arrays. This guide provides clear examples and explanations to enhance your programming efficiency.

  9. Find Array Elements That Meet Conditions - MathWorks

    This example shows how to filter the elements of an array by applying conditions to the array. For instance, you can examine the even elements in a matrix, find the location of all 0s in a multidimensional array, or replace NaN values in data.

  10. Matlab: find multiple elements in an array - Stack Overflow

    Jan 10, 2017 · I want to find multiple elements of a value in an array in Matlab code. I found the function mod and find, but these return the indices of elements and not the elements. Moreover, I wrote the following code: x=[1 2 3 4]; if (mod(x,2)==0) a=x; end but this does not work. How can I solve this problem?

  11. Some results have been removed
Refresh