Question

How to generate random number in MATLAB

Hi everyone, I'm trying to generate four random numbers in the MATLAB. I want some ["sum" intended methinks? --dpb] of these fo...

8 months ago | 1 answer | 0

Question

How to calculate sequencing arrays in a matrix

The matrix A has 2 columns: first is ID and second is the degree. A = [2842198 7 2842198 7 2842198 2 2842198 7 ...

4 years ago | 1 answer | 0

Question

Does Matlab able to solve an inexact programing model?

Is there a way to solve an inexact programing model with Matlab?

4 years ago | 0 answers | 0

Question

How to find arrays in matrix

Suppose matrix A is as follows: A = [1;2;3;4;5]; And matrix B: B = [1,43,23,45;4,23,64,21;2,43,23,11;3,43,21,88;5,3...

4 years ago | 1 answer | 0

Question

How to sum up unique arrays in the matrix

Hi everyone, Suppose the matrix A is as follows: A = [10 1 180 10 1 40 10 1 40 10 1 160 10 2 10 ...

4 years ago | 1 answer | 0

Question

How to transform a matrix in Matlab?

Matrix A is as follows: A = [0 240 245 250 25 1 2 1 63 3 2 1]; I want matrix A to be transformed to B (l...

5 years ago | 2 answers | 0

Question

How to transform a matrix to a binary type in Matlab?

Matrix A is as follows: A = [0 240 245 250 25 1 2 1 63 3 2 1]; First row is header of the matrix. Except column...

5 years ago | 1 answer | 0

Question

How to save the output of matrix calculation with different dimension

Matrix A is as follows: A = [0.535700142949073 0.979891844387851 0.971530253658353 0.0298279396616543 0.594892834326848 0.0...

5 years ago | 2 answers | 0

Question

How to remove some certain rows in Matlab?

Matrix A is as follows: A = [45,1,1,1,2;74,1,2,3,1;75,1,1,3,1;73,1,1,1,1;53,1,1,3,2;98,1,1,1,1]; I want to find those ...

5 years ago | 2 answers | 0

Question

How to reformat a matrix with a continuous string

Matrix A is as follows: A = [7843,20,21,22,24,21;2345,21,23,22,24,25;5452,21,20,22,24,25;4231,20,21,22,23,20]; First con...

5 years ago | 1 answer | 0

Question

How to split a matrix?

Hello everyone, I have the matrix A as follow: A = [25,240,15,H;25,255,10,R;25,265,20,H;63,240,10,W;63,250,35,L]; The...

5 years ago | 1 answer | 0

Question

How to find first two maximum number in the matrix

Hello everyone, I have the following matrix A (right table): A = [1248,30,12;1248,20,13;1248,5,14;177,5,12;177,25,13;230...

5 years ago | 2 answers | 0

Question

How to count data based on the categories

There is a Master matrix as follow that includes a unique ID (first column), different ID (second column) and last three columns...

5 years ago | 3 answers | 0

Question

How to save graph in each iteration

I have a loop in my code that in each iteration is produced a graph. I want to save all of graphs in each iteration. If I use th...

5 years ago | 1 answer | 0

Question

How to write to a text file without overwriting existing file content in matlab

Matrix a in each run will be created new values and I want to save output values in each run to the same file without overwritin...

5 years ago | 1 answer | 0

Question

How to join two matrix arrays together

I have two matrices A(i) and B(i) with similar (i) arrays. This i will be vary in each run. For example for i = 3, A and B are: ...

5 years ago | 1 answer | 0

Question

How to join two matrices together

I have two for loops that in each iteration is producing n & m series of data for Start_MS (i) & Duration_MS (i) & Start_DS (j) ...

5 years ago | 0 answers | 0

Question

How can I change color in barh graph

How can I change colors (blue and yellow as defualt) to any other colors in barh graph in Matlab? <</matlabcentral/answer...

5 years ago | 1 answer | 0

Question

Is it possible to change label names in Matlab

I want to have different names in my Y axis rather than numbering like the following photo: <</matlabcentral/answers/uplo...

5 years ago | 4 answers | 0

Question

How can I make matrix name and value in one matrix

I have several value with individual name for each. How can I bring all of them in one matrix that first column is value and sec...

5 years ago | 1 answer | 0

Question

How to plot multiple graphs in multiple rows in one grap

I have several graphs that I'm using subplot command line to get all of them in one figure. However, all of them will be sequenc...

5 years ago | 1 answer | 0

Question

How to find a number location in a multiple sub-matrices?

I have a combined matric "z" which is included 3 sub-matrices "a", "b" and "c". RNG is a random number from matrix z. So, I want...

5 years ago | 2 answers | 0

Question

How to read and save multiple excel sheets in Matlab?

Hi everyone, I have an excel file with 10 sheets. Sheets names are as default from sheet1, sheet2, sheet3, ...., sheet10. How...

5 years ago | 1 answer | 0

Question

How to generate random number from cumulative distribution function (CDF) in Matlab

Hi everyone, Similar to R program, I'm looking for a code in Matlab that I can generate a set of random number with a specifi...

5 years ago | 3 answers | 0

Question

Is there any default tools or code in Matlab for monte carlo simulation (MCS)

Is there any default tools or code in Matlab for Monte Carlo Simulation (MCS) Or Markov Chain Monte Carlo

5 years ago | 1 answer | 0

Question

Probability density functions (PDF) in Matlab 2012a or earlier

Does anyone know how to calculate PDF in Matlab version 2012a or earlier? If I used the following default code in Matlab fo...

5 years ago | 2 answers | 0

Question

How to find a specific row in the matrix and extract it to the new matrix

Can anyone give me any suggestion how I can find the specific row (matrix= criteria) from main matrix (big matrix) and then extr...

6 years ago | 3 answers | 0

Question

How to find repetition of each unique array in matrix?

Suppose I have a matrix a: a = [100680 114678 114678 31678 31678 31678 31678 19505 19505 19505 ...

6 years ago | 2 answers | 0

Question

How to break with two conditions

I want to break my code when both m and m2m is smaller than 0 I used the following command, but it gave me error: ...

6 years ago | 2 answers | 0

Question

How to select randomly among all positive value in a matrix

Hi everyone, I need a fast and efficient code for the following problem: Suppose I have matrix m and m2m: m = [3;4;5;...

6 years ago | 2 answers | 0