Why the result of GMM(Gaussian mixture model) is not the same for twice calculation?
There is a random component to the fitting algorithm. The results will not be exactly the same each time, because the pseudorand...

3 Monate ago | 0

| accepted

Creating new dataset corresponding to certain name within a variable column
Here is one possible way. (It assumes your table's variable name is tbl.) outcome = tbl(ismember(tbl.bottle,'C-a'),:);

3 Monate ago | 0

Boxplot and Dimensions Arrays
If you define your original arrays as column vectors, instead of row vectors, your code will work. Try this instead: %msf for s...

3 Monate ago | 0

| accepted

Removing vertical line from the script window
From the Command Window: MATLAB --> Preferences --> Editor/Debugger --> Display Increase the right-hand text limit.

3 Monate ago | 0

| accepted

Center of two points (positive and nenegative values)
I believe your calculation is correct for negative values of v. The problem is that the point may not lie between the two input ...

3 Monate ago | 0

| accepted

how to test if multiple distributions are statistically different from each other?
What is reported in that table are the parameters of lognormal distributions. Because the parameters are different, those distri...

3 Monate ago | 0

Missing factor using rule of three?
Try (0.004*4*pi)/(2*pi) The reason your syntax does not work is that it will divide by 2, and then multiply by pi. See order ...

3 Monate ago | 1

| accepted

How can I average the first 14 columns, the second 14 columns, and so on and so forth?
Assuming you actually want to average over columns (see my question above), I believe out = movmean(M,[0 13],2); out = out(:,1...

4 Monate ago | 1

delete rows from matrix if some of its elements equal all elements in another rows another different dimension matrix?
Here is one way: Sw = [2 3 6 25 11 3 6 7 8 9 3 6 25 8 9 3 6 25 11 11 3 4 5 6 25 4 ...

4 Monate ago | 0

Can copula PDF value exceed 1?
Yes, a probability distribution function can have values greater than 1. Remember that the PDF is not the probability at that l...

4 Monate ago | 0

| accepted

What happen with confusion matrix ?
It looks like you have 55 observations. 51 of them were classified correctly (along the diagonal, indicated in green). But 4 of ...

4 Monate ago | 0

| accepted

Vectorized Search of substrings in Cell Array
Discovered a much cleaner way: contains(t,'bc');

4 Monate ago | 0

Vectorized Search of substrings in Cell Array
Here is one way: cellfun(@(x)not(isempty(x)),strfind(t,'bc'))

4 Monate ago | 1

Conversion of any base (n) to a base 10 number?
There is a thorough answer to this question here.

4 Monate ago | 0

How to create this matrix without hardcoding the values
Here is one way. r = [ 1.5355 + 0.0000i -1.0914 + 1.0781i -1.0914 - 1.0781i 0.3621 + 1.3117i 0.3621 -...

4 Monate ago | 0

| accepted

how to make a curve of Poisson, Rayleih, t , ....etc distribution of my random data (in histogram)
If you have the Statistics and Machine Learning Toolboox, then you could use the fitdist function. It will fit a large variety o...

5 Monate ago | 0

| accepted

gevfit error: Operands to the || and && operators must be convertible to logical scalar values
That code works for me, in both 2018b and 2019a. Does this happen with a freshly started instance of MATLAB? If so, you might ...

5 Monate ago | 0

| accepted

how to find out wether the array is Hill or not?
I think this is right, but I have to admit I have not thoroughly checked it: % Original data a=[1,2,2,3,3,4,4,2,-1,-1]; % F...

6 Monate ago | 0

| accepted

are there workbook front ends for matlab?
Live scripts and functions are a notebook-like functionality within MATLAB.

6 Monate ago | 0

how can I generate data mixture of 2 Normal distributions and has the form f(x) = 0.4X1 + 0.6X2 where X1 ~ N(0.4 ,0.15^2) and X2 ~ N(0.7 , 0.09^2)?
Here is one way: % The number of random samples to generate N = 10000; % First, generate a binomial variable, which 40% of ...

6 Monate ago | 1

| accepted

Accumulate previous values in time serie
You should be able to use the movsum command.

6 Monate ago | 0

| accepted

Scanning a column in matrix with repeated values
This code does the initialization. I'm still trying to figure out what you mean about filling it in. [Edited afterward to fill ...

6 Monate ago | 0

| accepted

Finding boundaries of kmeans clustering
Use the centroid coordinates as input to the voronoi command. xy1 = [randn(50,1) randn(50,1)]; xy2 = [randn(50,1)+5 randn(50...

6 Monate ago | 0

How do I only keep specific values in an array of numbers?
You could do intersect(yourArray,65:90) You also should not use sort as a variable name, because it is a MATLAB keyword. You w...

6 Monate ago | 0

| accepted

plotting projectile with drag
If I increase cd to a very large value, for example cd=10000; then I see the impact of drag -- the trajectory is no longer a p...

6 Monate ago | 0

Assign different colors to multiple plots without loop
Here is one way: ColorSpec = [0 0 0; 1 0 0; 0 1 0; 0 0 1]; % Pretend data x = sor...

6 Monate ago | 0

| accepted

calculate total percentage on either side of histogram
Taking a very different tack ... maybe you'd find the cdfplot command useful?

6 Monate ago | 0

Why does 7*(0.1) - 0.7 = 1.1102e-16 whereas 9*(0.1)-0.9 =0 in MATLAB?
See the section "Accuracy of Floating-Point Data" in this documentation page. Some of those combinations are represented by the...

6 Monate ago | 0

Rearranging a Vector Back Again
% Original x x = [0 0 1 1 0 1 0 0 1 1]; % Sorted x [x_sorted,indices]=sort(x,2); % Original x recovered from the sorted...

7 Monate ago | 0

| accepted