Answered
How to replace non consecutive value on a vector?
Here is an absolutely terrible, obfuscated way to do this: A = [5,5,5,5,5,4,5,5,5,5,4,4,5,5,5,5,4,4,4,5,5,5,5]; SA = char(A)...

4 years ago | 0

Answered
Vector as an input in function
a = 2; b = 3; v = [a; b]; f_out = f(v) function out = f(v) out = 5*v(1) + 7*v(2); end

4 years ago | 2

Answered
How do I convert a non-normal distribution to an equivalent normal distribution?
A few thoughts that might be useful, if not exactly a complete answer to your question ... First, I hope it is clear that not a...

4 years ago | 2

Answered
I am trying to figure out how to plot my data.
You don't say what kind of figure you want. I suggest you look at the MATLAB Plot Gallery. If you see something like what you wa...

4 years ago | 0

Answered
roots(x) vs root= interp1(y,x,0)
It's not clear, at least to me, what you mean by "root = interp1 command". But, my best guess is that if you were somehow trying...

4 years ago | 0

Answered
How to present my outcomes in the form of a confusion matrix
If you have the Statistics and Machine Learning Toolbox, you could use the confusionchart or confusionmat command.

4 years ago | 0

Answered
Defining upper and lower control limits for a graph
Here is a simple example of setting plot limits based on the data. (The last line of code is where I set the limits.) x = 1:50;...

4 years ago | 0

Answered
Create a legend according to the colors of a scatter plot
Unless I have misunderstood your question, you should be able to do this using the gscatter command. The legend will be tied to ...

4 years ago | 2

Answered
why cntrd function error
If you are talking about this particle tracking code, you might want to reach out to that team. You might not find very many peo...

4 years ago | 0

Answered
split data into 5 train and test data
You can use the cvpartition function to do this, if you have the Statistics and Machine Learning Toolbox. If you don't have tha...

4 years ago | 0

| accepted

Answered
What is the Len function do? It used to exist in MatLab 4.2, but now it doesn't any insight?
To my knowledge, there has never been a function called len() or Len() in MATLAB. But, I wonder in your case if len() is a user...

4 years ago | 1

| accepted

Answered
find first& end of array
I expect someone will post a more elegant method, but I think this does what you want S=[0 1 5 2 0 0 0 9 3 50 53 0 0 5 7 4]; ...

4 years ago | 0

Answered
How do I make a World Cup simulator with MATLAB?
You can use the randperm function to select 2 out of 4 teams to advance in each section. rng default A={'Qatar';'Ecuador';'S...

4 years ago | 0

| accepted

Answered
Hypothetical Factorial Question Solution
I don't really intend this to be a serious answer to your question, but according to the internet, this formula will work up to ...

4 years ago | 0

Answered
How to form the training set ?
I spent a little bit more time with the paper. It seems to me that in the paper, the labels y are supposed to be used when gene...

4 years ago | 0

Answered
How to deal with this grpstat error message
I think you want to use "mean" instead of "average" for the summary statistic.

4 years ago | 0

| accepted

Answered
Find function in arrays
You can use the ismember function to find out whether each element of one vector is present in the other, and also the location....

4 years ago | 0

Answered
How to use bitn
I'm not sure if this is what you mean, but there are several integer classes available in MATLAB.

4 years ago | 0

Answered
How I categorize a features?
Do you mean that you have numerical values, and you want to treat those as categorical instead? You can convert numeric to categ...

4 years ago | 1

| accepted

Answered
How to form the training set ?
If I understand all of your notation correctly, I think your training set needs to be an Mx3 matrix. If means that each observ...

4 years ago | 0

| accepted

Answered
how can i find my license number ?
In the upper right of the screen here, you should see "Get MATLAB", and an icon representing your account. Click on that icon, a...

4 years ago | 0

Answered
Creating a seed for ICA on eeglab to make sure same ICA components are created every time
Put the line rng default at the start of your code. See rng for details.

4 years ago | 0

| accepted

Answered
How can I use the command 'tiledlayout' inside a loop
The key is to create two different figures, each of which you can build up a tiled layout. Here is a trivial example of two fig...

4 years ago | 0

| accepted

Answered
Subplots of subplots (maybe using subaxis)
I would try the native tiledlayout function to make the subplots. I've never used beast, so I'm not sure if there are any weird ...

4 years ago | 1

Answered
permutations of 4 numbers in 7 positions IF the sum of the numbers is 600
This is a "making change" problem, where the smaller numbers can represent coins, and the large number is the total of the chang...

4 years ago | 0

Answered
How to apply SVM on training and testing data
You can use the fitcecoc function from the Statistics and Machine Learning Toolbox to fit multi-class SVMs. I've never used the...

4 years ago | 0

Answered
How to distribute random number of users within the different circles
There are several ways to do this. Here is one. I illustrated with 20 users, because with 200 users it is difficult to tell tha...

4 years ago | 0

| accepted

Answered
How to plot an x value using for loop from an input?
I have to admit that I did not fully understand your explanation. But I can tell you the specific reason you are getting an inde...

4 years ago | 0

Answered
Interpolate between specific values in a data set
You can use the interp1 function to do interpolation. x = [1, 2.2, 3, 4]; y = [0.2, 0.35, 0.4, 0.5]; x0 = 3.5; y0 = inte...

4 years ago | 0

| accepted

Load more