Question


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

presque 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

presque 11 ans il y a | 3 réponses | 0

3

réponses

Question


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

presque 11 ans il y a | 3 réponses | 0

3

réponses

Question


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

presque 11 ans il y a | 1 réponse | 0

1

réponse

Question


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;...

presque 11 ans il y a | 1 réponse | 0

1

réponse

Question


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? ...

presque 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

presque 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

presque 11 ans il y a | 3 réponses | 0

3

réponses

Question


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 = [...

presque 11 ans il y a | 3 réponses | 0

3

réponses

Question


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? ...

presque 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

presque 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

presque 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 11 ans il y a | 1 réponse | 1

1

réponse

Question


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

plus de 11 ans il y a | 2 réponses | 0

2

réponses

Question


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

plus de 11 ans il y a | 3 réponses | 0

3

réponses

Question


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

plus de 11 ans il y a | 2 réponses | 0

2

réponses

Question


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

plus de 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

plus de 11 ans il y a | 1 réponse | 0

1

réponse

Question


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] ...

plus de 11 ans il y a | 2 réponses | 0

2

réponses

Question


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] ...

plus de 11 ans il y a | 3 réponses | 0

3

réponses

Question


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

plus de 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

plus de 11 ans il y a | 2 réponses | 0

2

réponses

Question


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

plus de 11 ans il y a | 1 réponse | 0

1

réponse

Question


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 = [...

plus de 11 ans il y a | 1 réponse | 0

1

réponse

Question


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)...

plus de 11 ans il y a | 1 réponse | 0

1

réponse

Question


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

plus de 11 ans il y a | 1 réponse | 0

1

réponse

Charger plus