Answered
does MathLab interpolate tabular data with 4 varaibles (x1, x2, x3, x4) and return the y value?
If you have the full grid of data, then you can use interpn.

2 years ago | 0

Answered
Fixing the legend of a bar graph
Here is one way: load CountArray_A.mat x = CountArray_A(:,1).'; y = CountArray_A(:,2); figure(); graph = barh(x,y,'Face...

2 years ago | 0

| accepted

Answered
how does aic work for stepwiseglm?
Regardless of the criterion used (e.g. the default "Deviance" criterion, or the "AIC" criterion), the stepwise method brings in ...

2 years ago | 0

| accepted

Answered
Reshape 1D to 3D array
MATLAB arrays implicitly have length-1 dimensions after the defined dimensions. For example % Define 365x1 array M = rand(365,...

2 years ago | 0

| accepted

Answered
Background color of box (not just the figure background)
Frankly, I got a little bit confused by your description. Perhaps including some screenshots would help. I'm not sure, but I th...

2 years ago | 0

Answered
select a portion of the matrix
The following does what you asked for, for this matrix. The "rule" you specified was not perfectly clear to me, though, so this ...

2 years ago | 1

Answered
The normalization of histcounts
PDF is the probability density, not the probability. To get the probability for a given bin, you need to multiply by the bin wid...

2 years ago | 1

Answered
need explanation for the following code
This code is a MATLAB function that executes the commands within the function, in order. What each command does can be found by...

2 years ago | 0

Answered
How to I generate continuous arrays from two arrays with different data points?
Your question is not perfectly clear to me, but it sounds like you could use the interp1 function to interpolate each data set t...

2 years ago | 1

Answered
Why use 'try' ' catch' to handle exception
I think the following phrase from the documentation for try-catch is a useful characterization: "override the default error beha...

2 years ago | 0

Answered
How to connect to mongoDB
These are questions that should be able to be answered by whoever set up the MongoDB in the first place. But, here are a couple ...

2 years ago | 0

Answered
I have trained my time series NARX NN using 5*7875 inputs and 1*7875 target values. How do I make predictions for 5*10 new input values ?
You don't describe the code you used in any detail, so it is not possible to be certain, but if you did something like what is d...

2 years ago | 0

Answered
I am trying to write a Matlab program that calculates the average and standard deviation of scores given and determines the letter grade
I formatted your code to standard MATLAB style. Also, you don't seem to have realized that MATLAB is case-sensitive. So, I corre...

2 years ago | 0

Answered
how to check if two symbolic fractions are the same?
You can use isequal or isAlways, depending on the specific need. I suggest that you read the documentation, because there are nu...

2 years ago | 1

Answered
How to resolve the loss function error?
There are a number of potential errors with your code, but I would say that the most fundamental one is that you are using a cla...

2 years ago | 0

Answered
Use Indexing for more than 1 dimension of array simultaneously
You can use linear indexing: matrix = rand(10, 3); idx = [1; 2; 2; 3; 1; 2; 1; 2; 3; 3]; linearIndex = sub2ind(size(matri...

2 years ago | 0

Answered
What is the MPG in Random Forest Regression ?
That code looks similar to example code from the documentation for fitrensemble or templateTree. In those examples, MPG is one ...

2 years ago | 0

Answered
PCA function suddenly Stop working with error
The line [w,truefrac] = pcaklm(mfilename,varargin{:}); is not in the MATLAB pca function. You have presumably started calling ...

2 years ago | 1

| accepted

Answered
Is there a way to fit experimental data to a set of x,y points?
Informed by your comments on my other answer, I have a different one. Unfortunately, that answer is "What you are asking to do i...

2 years ago | 0

Answered
While using fit function, how to make sure the generated fit is only of the range of data points ?
If you only supply 6 data points to the fitting function, it will only use those points. MATLAB doesn't "know" to do anything el...

2 years ago | 1

Answered
Is there a way to fit experimental data to a set of x,y points?
If you have the Statistics and Machine Learning Toolbox, you should be able to do this type of fit with fitnlm (or possibly fitl...

2 years ago | 0

Answered
Use linkaxes on where all x-axes are linked but only some y-axes are linked
I think this does what you intend. You need to link x & y simultaneously, and the order of calling linkaxes matters. figure; ...

2 years ago | 0

| accepted

Answered
Estimate the maximum value among three consecutive values in a vector
A=[0.18, 0.01, -0.15, 0.08, .25, 0.12]; output = movmax(A,3)

2 years ago | 0

| accepted

Answered
How to run a WSL command from Matlab?
You can use the system function to execute an operating system command

2 years ago | 0

Answered
is matlab associatte certificate free of cost?
The certification exam is not free (but can be discounted in some situations). Go to this link and click "Register Now". You wi...

2 years ago | 0

Answered
vectorize expression containing if statement
Here is one way: A = [-5 3 2;2 3 4; 3 5 6; -2 8 9]; prod(A(A(:,1)>0,:),2) You could also have done the first operation as ...

2 years ago | 0

| accepted

Answered
Creating subplots based on a cell array
cell1 = {'AA' 'AA' 'BC' 'BC' 'BC' 'DD' 'DD'; 1 2 3 4 5 6 7; 7 6 5 4 3 2 1; 5 9 8 7 6 5 4}; cell2 = {'AA' 'AA' 'BC' 'BC' 'BC' 'D...

2 years ago | 1

Answered
Trouble Opening Program using System()
Looking at the string you are providing to the system command, I think you want system(['"' ICEM_Path ' -script ' ICEM_Script '...

2 years ago | 0

Answered
Griddata doesn't reach sample points
Here is the relevant line of the documentation for griddata that explains what is happening: "For all interpolation methods oth...

2 years ago | 0

| accepted

Answered
Help using tiledlayout and nexttile functions
It's unclear to me what you are expecting to get, but this code works exactly as I would expect. You have defined an 8x2 grid o...

2 years ago | 0

| accepted

Load more