Question

Error for function permutation with repetition.

Dear all, I am using matlab 2016b and try to find al the permutations with repetition. But it gives me an error saying: Und...

6 mesi ago | 1 answer | 0

Question

How to find parameters of binomial distribution?

Dear all, What code can I use in matlab to find the parameters of a binomial distribution? This question is very big. So I am r...

7 mesi ago | 1 answer | 0

Question

How to find the parameters of a binomial distribution?

Dear all, X is the number of sucesses and is binomiallly distributed with parameter n=20 and fraction p. The fraction p is un...

7 mesi ago | 0 answers | 0

Question

How to detect problematic part of the code

Dear all, in running my 300-lines code I encountered an error, saying that I do have nan inf in the input and I do not understa...

7 mesi ago | 0 answers | 0

Question

Simpler code for aggregating data by sum

Hello, given matrix A: A=[4 0.5;4 0.25;1 0.125; 2 0.2;4 0.6;3 0.2; 1 2/3; 2 1; 2 1/16;4 0.5] asked: Aggregate data in firs...

7 mesi ago | 1 answer | 0

Question

if NaN then...

Dear all, I have a function that returns me a PMatrix. But sometimes that matrix is full with nan's. The cause is known, but th...

8 mesi ago | 2 answers | 0

Question

When does the kernel fitdist function returns nan?

Dear all, I am using the fitdist function in my code and notice that for some inputs I have a vector with nan entries. Th...

8 mesi ago | 0 answers | 0

Question

How to continue without solution min max constraint problem.

Hello, Solving a min max constraint problem in matlab,is a part/function of my whole code. This function finds the optimal line...

8 mesi ago | 1 answer | 0

Question

Understanding the syntax of the minimax constraint problem

Dear all I am trying to solve a minimax constraint problem, where the objective function is an absolute function. Given the dat...

9 mesi ago | 1 answer | 0

Question

How to maximize system of linear equations?

Hello, Given: A=[4 3; -1 7; 5 9; 2 4]; x=[x1;x2]; b=[b1; b2; b3; b4]; How can I maximize the linear system of equations: Ax...

9 mesi ago | 1 answer | 0

Question

Can Matlab decides function based on data to find the best taylor series to use?

Dear all, Given a huge set of points (x,y) where x represents the time and y the residual. I want to express the residuals as ...

9 mesi ago | 0 answers | 0

Question

How to derive probabilities from density function?

Hello, I want to use the density function to find probabilities of unit intervals. In the distribution fitting app of Matlab,...

9 mesi ago | 1 answer | 0

Question

How to remove column from matlab table?

Dear all, Given table: TJClean = Xn_2 Xn_3 Xn_4 Prob1 Prob2 Prob3 ____ ____ ____ ...

10 mesi ago | 3 answers | 0

Question

How to do a right join based on multiple columns as ID?

Dear all, I want to join set B from the right with set A, based on the first three columns. (The values of the three columns ...

10 mesi ago | 1 answer | 0

Question

How to subset in matrix based on the first 3 columns?

Hello, I am trying to find subsets/matrices in matrix A, based on the first 3 columns, and then computing probabilities. For su...

10 mesi ago | 1 answer | 0

Question

How to execute R file in matlab with Windows?

Hello, I have a file in R that I want to include and execute in a Matlab file. My laptop uses Windows. Mathworks gives some s...

10 mesi ago | 0 answers | 0

Question

How to find probability of an interval using the density plot?

Dear all, Given: d=randi([-3 3],10,1);% an arbritrary set of values U=[-5:5];%range of interest Find: The images (proba...

10 mesi ago | 0 answers | 0

Question

How to check irreducible Markov chain?

Hello, Now I want to check in matlab if a Markov Chain is irreducible or not. I found some instructions in mathworks saying: ...

10 mesi ago | 1 answer | 0

Question

How to estimate probabilities of an arbitrary range, based on the probability distribution of a given a data set of numbers?

Hello, Given a series of values x, I want to estimate the probabilities of a range of numbers U, in(using) the probability di...

10 mesi ago | 3 answers | 0

Answered

Sampling some elements without replacement out of big population, based on a probability distribution

Bruno, the answer is very very clear, thanks a lot!

Sampling some elements without replacement out of big population, based on a probability distribution

Bruno, the answer is very very clear, thanks a lot!

10 mesi ago | 0

Question

Sampling some elements without replacement out of big population, based on a probability distribution

Hello, Given population U=1:20, The associated probability series is related to the importance of each element: p=[0.01 0...

10 mesi ago | 2 answers | 0

Question

How to sample columns from matrix based on norm squared sampling?

Hello, I want to do some random column sampling. This technique samples n columns of a matrix based on the probability distr...

10 mesi ago | 0 answers | 0

Question

How to generate numbers from probability mass function?

Hallo, Given a probability mass function defined as P(X=3)=0.2, P(X=7)=0.3 and P(X=10)=0.5, I want to generate randomly 30 nu...

10 mesi ago | 3 answers | 0

Question

How to change output ans?

Hallo, my algorithm works fine. But I do not like the output/ans matlab gives. it says: ans 1.0e+03 * 1.0000 ...

11 mesi ago | 1 answer | 0

Question

How to normalize a matrix such that each column sums equal 1

Hello, I have a matrix A=[1 2 3; 1 3 6] and want to normalize the matrix such that each column sum equals 1. The normalize...

11 mesi ago | 2 answers | 0

Answered

How to replace k-th diagonal by vector?

Yes Guillaume! It works! Thanks a lot. You are indeed right about the code. I pasted the code partially, and expected that the l...

How to replace k-th diagonal by vector?

Yes Guillaume! It works! Thanks a lot. You are indeed right about the code. I pasted the code partially, and expected that the l...

11 mesi ago | 0

Question

How to replace k-th diagonal by vector?

I have a code here that give me errors. In the code I am computing a i-th dot product and want to replace this values on the i-...

11 mesi ago | 4 answers | 0

Question

How do I find/retrieve block in block matrix?

Hi, let's say I have 3 matrices A,B,C and store them in a block diagonal matrix, such that I can refer easily to them in a fo...

circa un anno ago | 1 answer | 0

Question

Is there an inbuilt function/algorithm for finding a Higher Order Markov Chain model?

Hi, I am trying to find some guidance that could help me to find a Higher Order Markov Chain model for a time series, which e...

circa un anno ago | 0 answers | 0

Question

What is valid matlab syntax in if statement?

If I use "==" in the 9th line of this code it says: inappropiate use of == operator. If I use "=" I am getting a parse error. ...

circa un anno ago | 1 answer | 0