Frage


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

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 11 Jahre vor | 3 Antworten | 0

3

Antworten

Frage


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

etwa 11 Jahre vor | 3 Antworten | 0

3

Antworten

Frage


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

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 11 Jahre vor | 3 Antworten | 0

3

Antworten

Frage


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

etwa 11 Jahre vor | 3 Antworten | 0

3

Antworten

Frage


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

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 11 Jahre vor | 1 Antwort | 1

1

Antwort

Frage


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

mehr als 11 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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

mehr als 11 Jahre vor | 3 Antworten | 0

3

Antworten

Frage


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

mehr als 11 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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

mehr als 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 11 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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

mehr als 11 Jahre vor | 3 Antworten | 0

3

Antworten

Frage


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

mehr als 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 11 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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

mehr als 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 11 Jahre vor | 1 Antwort | 0

1

Antwort

Mehr laden