About 50 results
Open links in new tab
  1. MATLAB - create matrix with submatrices - Stack Overflow

    Mar 15, 2015 · Say I have three different 2x2 submatrices, and I want to create a big 6x6 matrix in Matlab in which the three submatrices appear on the diagonal, and all the other values are 0. …

  2. how to create logical matrix directly in matlab - Stack Overflow

    Apr 19, 2015 · I have so far been using a = logical (zeros (10,10)) to create logical matrix. Is there a way to create it directly?

  3. How do you create a matrix from a text file in MATLAB?

    Jun 19, 2009 · I want to convert it into a matrix. I tried importing data from the text file to an excel file, because that way its easy to create a matrix, but I lost more than half the data.

  4. How do I create a regularly-spaced array of values in MATLAB?

    How do I make an array that's defined with a start point, an end point, and a total array size? Something like an array that goes from 1 to 10 that's 20 elements long. For example, the array …

  5. How do you make a 2-d array in Matlab? - Stack Overflow

    Mar 12, 2010 · Keep in mind that matlab starts numbering from 1. Then, useful functions are zeros(m,n) % Makes a 2D array with m rows and n columns, filled with zero ones(m,n) % …

  6. matlab - How to generate a matrix through a loop? - Stack Overflow

    May 12, 2014 · 0 I´m wondering how to get these in Matlab: a = 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 11 10 12 Really the structure I want to do has 2 thousand files. but I will start with something …

  7. how to create a very large matrix using matlab - Stack Overflow

    Feb 2, 2010 · I have a problem with matlab when I'm trying to create a a matrix with a very large size such as 40000x40000.

  8. How do I create a 1 by N matrix, with elements from 1 to N …

    Aug 29, 2011 · The general pattern is [ start : step : stop ]; So if you want only even numbers from 2 to 100, you can do [2:2:100]; Or if you want to get numbers from 1 to 0 decrementing by .1 …

  9. matlab - Construct matrix from vector elements in simulink - Stack …

    Apr 2, 2021 · 1 I have a vector signal in Simulink that contains [x1,x2,x3] I want to multiply this vector with a matrix that is constructed from its elements, given by M=[0 x3 x2; x1 0 x3; x1 x2 …

  10. Create Spiral Matrix Matlab - Stack Overflow

    Apr 3, 2020 · Can any one help creating spiral matrix in matlab using only loops and if else conditions. For example n=5, spiral matrix is: 17 16 15 14 13 18 5 4 3 12 19 6 1 ...