Answered
Identify, for each column of a matrix, numbers that are smaller than the previous ones, creating a 0 1 output having the same size of the original matrix
My output is a bit different from yours, but I think I followed the algorithm you wanted. M = [ ... 1.05 21.22 17.2; ... 2....

3 years ago | 1

Answered
Select only the matrices within the cell
Does this do what you want? % Make up some input data, with one cell remaining empty A = cell(3,1); A{1} = rand(2,5); A{3} =...

3 years ago | 0

Answered
How to arrange a matrix in descending order w.r.t rows?
Answering here, based on your comment to my other answer. It seems that you just want to sort the matrix a according to its nor...

3 years ago | 0

Answered
How to arrange a matrix in descending order w.r.t rows?
Probably use the sortrows function. I'd be more specific, but it is unclear to me what you mean by "largest row". For example, w...

3 years ago | 0

Answered
how to get gini coeffecient
Seems to work here. (See the code that ran below.) Did you download the function and put it somewhere in your MATLAB path? Wha...

3 years ago | 0

Answered
Regression model with two equation
As @Torsten mentions in his comment, the way you have written your equations, it is not possible to see why they are coupled. T...

3 years ago | 0

Answered
Problems trying to find fakes dates.
This behavior is due to "carryover" in date vectors and strings. As recommended there, and many other places in the documentati...

3 years ago | 1

Answered
how can I give name to an array column?
MATLAB has several data types. Some of them, for example the "table" and "structure" data type, can have variable names associa...

3 years ago | 1

Answered
How to make changes in the table
Probably the easiest way to do this is via the following data operations: "unstack" the max/min temperatures into their own col...

3 years ago | 0

| accepted

Answered
How to create a time vector that is incremented between two datetime strings?
I think you intended endTime = datetime(2023,01,10,11,22,01.700)+duration; rather than endTime = datetime(2023,01,10,11,22,01...

3 years ago | 0

Answered
Merge a matrix present in the same position but in two different cells
Here is one way: % Inputs rng default cell = {rand(2,3); rand(5,7); []}; cell_A = {rand(2,1); rand(5,1); []}; % Output n...

3 years ago | 0

| accepted

Answered
How this write in summation form in matlab a0*b0+a1*b1+...................an*bn?
Assuming you actually have vectors, and not variables named a0, a1, a2, etc., then you can use the dot function: a = [1 2 3]'; ...

3 years ago | 1

| accepted

Answered
How can I plot 18 lines in different colors on a single plot?
If your version of MATLAB is 2019b or later, I suggest the colororder function. (I see that you mention an older version, so thi...

3 years ago | 0

Answered
Error while plotting zero crossing detector
To remove all the red stars, comment out this line: plot(xx1,zeros(1,length(ZX))-y1,'r*') To remove only the first red star, c...

3 years ago | 0

| accepted

Answered
what is the short code for the following?
It's a little tricky to answer this, without knowing how you plan to use these variables afterward. But, ket = eye(14); bra = ...

3 years ago | 1

| accepted

Solved


Find Air Temperature from Cricket Stridulation Rate
Stridulation is the process that creates a cricket's “chirp” by rubbing their wings or legs. According to the Old Farmer's Alma...

3 years ago

Answered
Histogram from numberdensity values.
Is this bar graph what you need? If not, can you explain a bit more? x = [6 5 3 23 67 33 74]; y = [5 8 2 4 9 2 1] *1e24; ba...

3 years ago | 0

Answered
how to made matrix of x,y,z from .xyz format file?
I don't know of any native MATLAB support, but it looks like the user-contributed atom submission might help you.

3 years ago | 0

| accepted

Answered
Matlab code contains comments with strange/unrecognisable characters. Can these be "translated" in English?
Given that there have been relatively recent updates to that FEX submission, I would ask the author (by posting in the Discussio...

3 years ago | 0

| accepted

Answered
Linear mixed models: how to get adjusted whole model values?
I'm not sure if there is a more fundamental way to do this, but you can extract the data from the plot. load carsmall Year = c...

3 years ago | 0

Answered
My code does not work properly
My best guess is that this is a problem at the source, and not with your code. I used curl directly against the API (as we have ...

3 years ago | 0

| accepted

Answered
Fuzzy Best-Worst Method
I had never heard of this method. I googled the keywords, and find this Stack Overflow answer and this github repo. Maybe that ...

3 years ago | 1

| accepted

Answered
How to pad zero in string using sprintf
@Fangjun Jiang gave a great answer for character arrays (which is what you show that you have). This is a case where MATLAB's n...

3 years ago | 1

Answered
Using unbalanced data with fitlme
You need to learn about data imputation methods. This is not, at its core, a MATLAB problem.

3 years ago | 0

Answered
I want to move up my boxchart
It doesn't seem to me that the code you pasted could create the plot example you've posted (but maybe I'm misunderstanding somet...

3 years ago | 0

Answered
Best method to create multi-dimensional data set?
One method would be nested cell arrays: Model = cell(3,1); % Three models Model{1} = cell(4,1); % Model 1 has four sets Mod...

3 years ago | 0

Answered
Matlab examples of "regexp" where "expression" is a string array or cell array of characters?
I'm not sure what you are looking for, but the function's behavior generalizes as you might expect: str = "it is what it is"; ...

3 years ago | 0

| accepted

Answered
Given a big square matrix and some eigenvalues, how to find the corresponding eigenvectors?
You could try to use eigs instead of eig. It allows you to get the largest N eigenvalues and the corresponding eigenvectors.

3 years ago | 0

Answered
So i have a 1089*5 matrix and i want to get the minimum value of the 4th column and the corresponding values in the row of the minimum value?
% Your matrix: M = rand(1089,5); % Find the minimum value of the 4th column, and it's index [min4,idx] = min(M(:,4)); % ...

3 years ago | 1

Answered
MATLAB: How to do CUV and PCA on a dataset
Call the pca function with the syntax [coeff,score,latent,tsquared,explained,mu] = pca() and you can use the explained output ...

3 years ago | 0

Load more