Regression tree and prediction equation
This model is probably nonsense, because of the linear dependencies that @dpb points out. But perhaps your real data will yield ...

| 採用済み

Is there a way to use a loop to generate outputs for a section of data (like rows 1 through 206) and then moving on to doing the same for subsequent rows within the same loop?
A somewhat more "advanced" way -- but perhaps more intuitive -- would be to convert Data into a 3-dimensional array first, where...

Is there a way to use a loop to generate outputs for a section of data (like rows 1 through 206) and then moving on to doing the same for subsequent rows within the same loop?
Here is one way: for ii = 1:100 indexToThisSection = (206*(ii-1)+1) : (206*ii); Stress=Data(indexToThisSection,...

making normally distributed over Specific Range
It is not possible to have a normal distribution in a finite range. So, we are all left guessing what the author of this docume...

How would I go about modifying a matrix of 1's and 0's, and converting that matrix to an image (or plot)
Here is another way, plotting circles. There are probably better ways to do this. It's a bit convoluted, because of the way matr...

| 採用済み

How would I go about modifying a matrix of 1's and 0's, and converting that matrix to an image (or plot)
One simple option would be to make a heatmap using imagesc: active = [0 0 0; 1 0 0; 0 0 0]; imagesc(active) axis square

How to plot rectangles using variables
Are you trying to plot 216 rectangle with that one line? If you look at the documentation, you will see that you cannot do that....

| 採用済み

Can I use google colab for running matlab codes
I don't have a definitive answer for you, but I'm pretty confident that the answer is -- No. MATLAB is definitely not made avai...

| 採用済み

I want to do bootstrap analysis by using 20*1 matrix.
One way is % Pretend input data M = rand(20,1); idx = randi(20,500,1); samples = M(idx);

| 採用済み

I want to do bootstrap analysis by using 20*1 matrix.
If you have the Statistics and Machine Learning Toolbox, you can do % Pretend input data M = rand(20,1); samples = randsamp...

You really don't give enough detail about what you are trying to do. You are making us assume and/or guess too much. Maybe you ...

How to get max of repeated values?
Here is one way; % Input C = [0.5000 0.5000 0.3000 1.0000 0.8000 0.3000 0.7000 0.7000 0.3000 0.4...

| 採用済み

How to get a for to end just before Index exceeds the number of array elements?
This seems like homework, so I will give you a hint instead of just answering. It seems like according to the rules, the last e...

| 採用済み

how to plot group box-lot with use of function multiple box-lot
multiple_boxplot is not built in to MATLAB. It looks like it is a user-contributed functoin that you can download from the File ...

| 採用済み

Check if cell contains another cell
a{1}='1-v1'; a{2}='.*'; a{3}='3+v2'; a{4}={'this is a cell'}; cellfun(@iscell,a)

| 採用済み

How to make constants global
The first google hit for searching global matlab is this documentation page on how to define global variables.

surf plot of custom data
It looks like the data are there as you expect, and it is just a matter of zooming in to the correct part of the "landscape". He...

How to set x axis limit while using semilogx
10^0 is 1 (not 0), so this works ... T = [0 10 100 1000 10000]; Y = [0 1 4 7 10]; semilogx(T, Y) axis([1 10000 0 12])

Tengo esta figura, y deseo sombrear la región entre la linea amarrilla y la linea roja. Tal vez alguien pueda darme una idea de como hacerlo. Muchas gracias :)
Both the patch and fill functions are useful for doing this. See examples in the documentation.

Create a new table with filtered rows
Here is one way. % Pretend data sports = categorical({'basketball';'volleyball';'basketball'}); num = [2;3;5]; % Put in a ...

I get Arrays have incompatible sizes for this operation with an elseif statement what do i do?
The essence of your issue is that you are using a character array as input. When character arrays are compared with the equality...

How to get the predicted variables name in LASSO function?
You only supplied the PredictorNames input in your call to LassoPlot, not to lasso itself. var_names_test = {'a1','a2','a3','a4...

| 採用済み

Assign a line in every element of a 3d matrix
To replace all values of 10 with 101.543, you can do val(val==10) = 101.543; Maybe that helps?

How do i use fminsearch to find the minimum or maximum of a function . x.^4-3.*x.*y+2.*y.^2
Did you try reading the documentation for fminsearch? The very first example is exactly like your problem. fun = @(x)(x(1)^4 - ...

Why my answer is not aligned with the prompt?
You need to add a line feed. I'll use fprintf instead of input to illustrate: fprintf("1: This will split \n into two lines") ...

Keep getting the error "not enoguh input arguments"
You call the free_space function like this: if not(free_space(player_input)) but the free_space function takes two arguments: ...

| 採用済み

How to change plotted graph's line?
If you leave the marker symbol off, the plot command will default to using a solid line with no symbol. You can also just explic...

| 採用済み

The end operator must be used within an array index expression
In your code, you have not yet created any variable named y, before you call this line: y(1:end-1) = y(2:end-1) Therefore, you...

How plot data as histograms?
This is not a histogram. It is a stacked bar chart. Take a look at this documentation to see how to construct this type of chart...

| 採用済み

Axes not reconizing figure handle
The problem seems to be specifically with the XLabel argument, and the error message is non-intuitive (at least to me). This wo...