Answered
Multcompare returning negative p values
Note that the negative p-values are all tiny. I expect this is just round-off error. % Load the data from the uploaded file lo...

3 years ago | 0

Answered
Getting errors for equations while linear fitting.
I assume you meant lsline rather than hsline. lsline does not compute the confidence intervals of the fit parameters. To do tha...

3 years ago | 0

| accepted

Answered
How do I compare the order of rows in cell array with a matrix?
You can use the ismember function to both test that the values of one array are present in the other one, and also to get their ...

3 years ago | 0

Answered
how does cdfplot works?
What you are plotting is known as a "survival" curve, and I think it is possible that you want to use the ecdf function instead ...

3 years ago | 0

| accepted

Answered
Hypothesis Tests for Constrained Linear Regression
One can often estimate the uncertainty in statistical parameters by bootstrapping. Here is an example of doing this with an ord...

3 years ago | 0

Answered
How to find the histogram of each row vector from 8-by-10000 matrix?
The histogram function is primarily for plotting histograms. As described in that documentation, the output you are getting is t...

3 years ago | 0

Answered
How to calculate the coefficient of determination R^2 of a Neural Network?
The formula is in the documentation here (for fitlm).It is not always the best goodness-of-fit measure for all models, but you s...

3 years ago | 0

| accepted

Answered
How to run matlab on GPU
I'm not sure what you mean by "automatically". I would start with the documentation page on how to Run MATLAB Functions on a GPU...

3 years ago | 0

Answered
I used "[b,dev.stats]=glmfit(b1,a1,'binomial')" function, and it has an error..
You should carefully read and understand this section of the documentation for glmfit, which specifies what is expected for the ...

3 years ago | 0

| accepted

Answered
How to use Shapley function for an already fitted regression model?
To my knowledge, there is no way to use MATLAB's shapley function other than with a blackbox model object as the input. The poss...

3 years ago | 0

Answered
zeros of a matrix
The code you have posted here runs without error. M=rand(5); A=zeros(size(M,2)); My best guess here is that you have a variab...

3 years ago | 0

Answered
How to make certain indexes of a cell array empty?
Here are a couple ways: % Make up a cell array of pixelBlock pixelBlock = {'2','3','5',7; 11, 13, '17', '19'} % Replace a f...

3 years ago | 0

Answered
i dont understand the error here, where do i put the parantheses??
It looks like on this line of your code: wn = pi/((S.PeakTime)(1-(zeta)^2)^ 0.5) you are assuming that MATLAB will understan...

3 years ago | 0

Answered
Curve fitting tool fits a wrong equation
I can't figure out what is going wrong here, and I don't have the Curve Fitting Toolbox to play around. I get a sensible fit us...

3 years ago | 1

| accepted

Answered
Differences in power law fit vs. linear fit on log-log scale
Hm. I get much closer values when I use fitlm (0.498) and nlinfit (0.504), for the log-space and original space, respectively. (...

3 years ago | 0

| accepted

Answered
How to prevent the elongated plot when using tiled layout for image and plot
There are a few ways you can manipulate this. Here is one way, using the daspect command you used before: [X,Y,Z] = peaks(20); ...

3 years ago | 0

| accepted

Answered
I want to ask if it is possible to add these two horizontal matrices and if so, how?
As shown below, these two arrays have different sizes, and not even the same number of elements. Tt is very unclear, mathematica...

3 years ago | 0

Answered
I used "autocorr"function and got this graph. How can I interpret this grpah meaning?
It's difficult to know how much needs to be explained here. I'll assume that you know what autocorrelation is. Unless you speci...

3 years ago | 0

| accepted

Answered
Constrained multiple linear regression with multiple dependent variables
I think mvregress does what you want. It has been ages since I've used it, but I wrote a pretty detailed answer that gave three ...

3 years ago | 0

Answered
How to use unique() in a cell array
I'm not certain, but I believe what you want is unique(vertcat(b{:}))

3 years ago | 0

| accepted

Answered
Blockwise matrix addition without using more than 2 dimensions and cycles
This is awkward, but it does what you want. I think there is probably a better way. % Inputs A = [1,2,3,4,5,6,7,8; 9,10,11,12,...

3 years ago | 0

| accepted

Answered
Blockwise matrix addition without using more than 2 dimensions and cycles
A = [1,2,3,4,5,6,7,8; 9,10,11,12,13,14,15,16]; B = A(:,1:end/2) + A(:,(end/2)+1:end)

3 years ago | 0

Answered
i want to multiply input * gex , where input is (60000 *784) and gex is (784 *1000), but when i multiply that i get this error message Error using input Not enough input a
The main problem here seems to be that input is a built-in MATLAB function, and your code is trying to call it (and doesn't have...

3 years ago | 0

Answered
Mean data of each month (Data Matrix)
Here is one way: % Create a table of pretend data, in your format Var1 = [2000; 1; 1; 0.12]; Var2 = [2000; 1; 2; 0.13]; Var3...

3 years ago | 0

Answered
Grouping data to reduce number of columns in a table
% Some pretend data TenSecResult = magic(3); % The output you want output = string(TenSecResult(:,1)) + "-" + string(TenSec...

3 years ago | 0

Answered
How can I stop manually a true while loop?
When a file is executing, the Run button in the editor window becomes a Pause button. Pressing that will pause execution, with a...

3 years ago | 0

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
The assignment will only have the same number of elements if maskMax3D and maskMin3D have the same number of TRUE elements. For ...

3 years ago | 1

Answered
How to plot the following figure in matlab?
I can't tell if you are asking for help in how to draw each individual plot, or just placing the individual plots. If you are j...

3 years ago | 0

| accepted

Answered
Write variable label on the Y-axis of graphs
plot(rand(3)) ylabel("$\tilde H_{H,2}^{H,1}$","Interpreter","latex")

3 years ago | 1

| accepted

Answered
Plotting Only 4 Time steps
I expect that this if statement is not doing what you expect ... if(mod(t,10)) The lines following that will be executed whene...

3 years ago | 1

Load more