Domanda


How to select random number in a matrix?
The following command can find all max values in each iteration of matrix m and then chose *first* one: [rowsOfMaxes colsOf...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


How to sum up of sum unique arrays in a matrix
Suppose I have a matrix a: a = [12,7,1,1,1,1;28,5,2,1,1,1;28,4,2,2,1,1;32,10,2,1,1,1;32,10,2,2,1,1;37,2,4,1,1,1;48,11,4,1...

quasi 10 anni fa | 3 risposte | 0

3

risposte

Domanda


How to make a new matrix with all common arrays from different matrices
Suppose I have some matrices as follow: m1 = [1;2;3;4;5;6;7;8]; m2 = [2;3;4;6;7;8;9;10;11;12]; m3 = [4;5;6;7;8;9;1;;1...

quasi 10 anni fa | 3 risposte | 0

3

risposte

Domanda


Join some matrices without repeating arrays
Suppose I have matrices r1, r2 and r3 as follows: r1 = [50;10;90;30]; r2 = [60;50]; r3 = [30;20;100]; I need a joi...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


How to remove some arrays in a matrix
Suppose I have a matrix m: m = [3;5;6;1;2;8;5;2;9;1;2;7;8;3;4;9;3]; and restricted matrices r1 and r2: r1 = [5;1;9;...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


How to split output in Matlab and save it in two different excel files?
Is there any way that we can split output and save it two different excel files or even two different sheets in a excel file? ...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


How to add a header line to txt file?
How can I add a header line to the following code (header for txt output): O = [2,1;4,6;2,10;6,800]; fid = fopen('Output...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


How to find index of first 3 maximum number in matrix
I have the following function that n is the first 3 maximum value of matrix m: m = [7;1;4;4;12;2;6;10;2]; temp = sort( m...

quasi 10 anni fa | 3 risposte | 0

3

risposte

Domanda


How to get first 3 maximum number in a matrix
Suppose I have a matrix m: m = [7;1;4;4;12;2;6;10;2]; I want to find first 3 maximum in matrix m, means like: n = [...

quasi 10 anni fa | 3 risposte | 0

3

risposte

Domanda


Join some matrices to one matrix
I have a cell array of matrix m{j} % which row numbers are different in each j How can I bring all of them in one matrix? ...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


Mis match of dimensions
Suppose I want to find all maximum number in the matrix m: I used this command line: mm(:,:,j) = find( m(:,:,j) == maxli...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


Reshape a matrix in different way
Is there any other way to re-code this function (perhaps with for loop): mmm = [2;3;4;8;9;11;13;14;15;16]; Dmm = zeros(2...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


Sum of all odd and even arrays in matrix
Suppose I have a matrix a: a = [2,3;1,2;1,2;0,1;1,2;3,1;1,3;2,1;2,3;3,1]; I want to build matrix b with dimension 2*2 th...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


Creating a new matrix from two matrixes
Suppose I have a matrix a: a = [9,1;1,1;3,1;2,1;5,1;6,1;8,1;1,1;2,1;5,1;8,1;2,1]; And I have another matrix b which is l...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


Bhilding new matrix with selected index number
Suppose I have a matrix a: a = [9;1;3;2;5;6;8;1;2;5;8;2]; And I have another matrix b which is like some selected index ...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


How to build a new matrix
I have a matrix a = [4;6;8;2;8;2]; And I want it to be like: b = [7;8;11;12;15;16;3;4;15;16;3;4]; Matrix b is ca...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


How to find a subset matrix in the main matrix and build a new matrix
Hi everyone, Suppose I have two matrices A and B. The matrix A is a subset of matrix B (it can be possible that some of array...

quasi 10 anni fa | 1 risposta | 1

1

risposta

Domanda


Filtering a matrix to some small matrices
Hi everyone, Suppose I have a matrix: a = [12,7;12,5;2,7;23,3;23,43;23,12;3,5;76,21;76,31;4,3;4,7;4,9]; Then I want ...

circa 10 anni fa | 2 risposte | 0

2

risposte

Domanda


Classification of a matrix to 0 and 1 matrix
Hello everyone, I want matrix A to be like matrix B <</matlabcentral/answers/uploaded_files/15256/Hesam%20(1).jpg>> ...

circa 10 anni fa | 3 risposte | 0

3

risposte

Domanda


How to find repeated array in a matrix
Hello everyone, Suppose matrix a is like: a=[1;2;2;3;3;4;5;6;6;7;7;7;8]; and matrix b: b=[2;7;1;3;2]; Then, I...

circa 10 anni fa | 2 risposte | 0

2

risposte

Domanda


How to create a new matrix with some known rows
Hello everyone, Suppose matrix a is like: a = [2;3;6;2]; b = [1 3 6;2 3 7;2 2 1;3 1 9;3 2 8;4 1 5]; Then, I want m...

circa 10 anni fa | 1 risposta | 0

1

risposta

Domanda


Counting duplicate cells in a matrix
Hello everyone, Suppose matrix a is like: a = [12,28,28,32,32,37,48,72,72,73,73,73,97,100,100,100]; I want matrix b ...

circa 10 anni fa | 1 risposta | 0

1

risposta

Domanda


List of maximum number in the matrix
Hi everyone, Suppose I have a matrix: a = [3;1;4;2;3;4;1;4;3;1;2;4]; Then I want matrix b to be: b = [3;6;8;12] ...

circa 10 anni fa | 2 risposte | 0

2

risposte

Domanda


Creating a matrix by some other matrices
Suppos I have: a = [3;3;5;8;2;1;8;1;5]; b = 2 I want matrix c to be: c = [3 2;3 2;5 2;8 2;2 2;1 2;8 2;1 2;5 2] ...

oltre 10 anni fa | 3 risposte | 0

3

risposte

Domanda


Updating values with for-loop
Hello everyone, I want to update the matrix "e" according to the new value of matrix "d" for each iteration. Matrix "d" i...

oltre 10 anni fa | 1 risposta | 0

1

risposta

Domanda


Replacing row number with value
Hi everyone, Suppose I have a matrix a: a = [2 2;1 1;4 1;3 1;4 2]; and matrix b: b = [3;5;1;5;2;4;2;3;5;1]; T...

oltre 10 anni fa | 2 risposte | 0

2

risposte

Domanda


Save max of each iteration
Suppose that matrix A have new value in each iteration (updatable), Is there anyway to save the rowsOfMaxes matrix A in each ite...

oltre 10 anni fa | 1 risposta | 0

1

risposta

Domanda


Find the first position of maximum value in a Matrix
Hello everyone, Suppose there can be the max value at more than one location, how can I catch the first max value. A = [...

oltre 10 anni fa | 1 risposta | 0

1

risposta

Domanda


How to save maximum value in each iteration
Hi everyone, Suppose I have a for-loop: a=rand(1); n(:,:,1) = zeros(1,1); for i = 2:4 n(:,:,i) = n(:,:,i-1)...

oltre 10 anni fa | 1 risposta | 0

1

risposta

Domanda


Sum repetition in matrices
Hi everyone, Suppose I have matrix d1, d2, d3, d4, d5: d1 = [0 0 0 1;0 0 0 0]; % input data d2 = [0 0 0 0;1 0 0 0...

oltre 10 anni fa | 1 risposta | 0

1

risposta

Carica altro