Answered
How can I insert a title under a group of subplots?
Personally, I would use the more modern tiledlayout (rather than subplot), but then add your text using an annotation (or just t...

2 months ago | 1

| accepted

Answered
Unable to perform assignment because the size of the left side is 1-by-1
My best guess as to the problem is that in this expression ones(1,k+i)-K(k+i) you don't really intend to add a vector of ones ...

2 months ago | 1

Answered
Set one common Xaxis for a sublot with rows = 1 and columns = 2
You may find the linkaxes command useful. You can also share properties (e.g. titles, xlabels) in a tiledlayout.

2 months ago | 0

Answered
what is the equivalent of 'improfile' in octave?
This Octave wiki page suggests that the improfile function is missing from Octave.

2 months ago | 0

| accepted

Answered
How do i delete the spaces that are in the middle of a string array?
Here is one way: str=' 123 456 '; str(str==' ') = [] This method relies on the fact that the white space is a space cha...

2 months ago | 1

Answered
Curve smoothing / fitting
Do you mean you want a smooth line that goes through all the points? You could fit a spline: % Set seed for reproducibility rn...

2 months ago | 0

Answered
Want to be able to call python 3.9 from MATLAB 2022a
I am not on a Windows machine, but I am pretty confident you want to download and run the last one you listed, the 64-bit Window...

2 months ago | 0

| accepted

Answered
Count the number of "aggregate" peaks in a vector?
I am absolutely positively NOT an expert in this, but I think what might be helpful here is putting your signal through a low-pa...

2 months ago | 1

Answered
How to increase the distance between labels on the matrix axes
When you say that making the font size smaller "didn't work", can you be more specific? Do you mean that even with the smallest ...

2 months ago | 0

Answered
What kind of coding do I need to create a program that will recognize the word I am saying and repeat that same word to me?
Take a look at the documentation on how to Record and Play Audio in MATLAB. FYI, it took me literally a few seconds to google t...

2 months ago | 0

Answered
please explain this code
I ran your code here. You can see that figure it creates. That's what the code does. It defines some data, does some calculation...

2 months ago | 1

Answered
Replicating one dimension of a 3d matrix
If M is your array, then output = repmat(M,[10,1,1]);

2 months ago | 1

| accepted

Answered
Matlab does plot datetime data (only hours) on wrong day
The most fundamental fix to your issue is to explicitly use the modern datetime format for your times. Then, downstream function...

2 months ago | 0

Answered
How to split a 3 by 3 matrix into rows and save rows separetly in arrays
ra = NewRange(1,:); rb = NewRange(2,:); rc = NewRange(3,:); Be aware that you may not actually need to do this separation, be...

2 months ago | 0

Answered
predictorImportance changes between releases
Are the ML model results themselves identical? Off the top of my head, I don't know enough about the algorithm and possible cha...

2 months ago | 0

Answered
How to add a line break in categorical array?
Here is one way: X = categorical({sprintf('First Inter-monsoon\\newline (March - April)'), ... sprintf('South...

2 months ago | 1

| accepted

Answered
using eval with save function
It can be tricky to construct the string needed, from a combination of text and numerics. I would recommend a few things here. ...

3 months ago | 1

| accepted

Answered
add value from single element of array
Your example is confusing to me, partly because I think you made some careless math errors. But, the way I could approach this i...

3 months ago | 0

Answered
remove the frequent values withou sorting
You can still use unique: x = [3 4 3 5 1 0 4 2]; x = unique(x,"stable")

3 months ago | 1

| accepted

Answered
Show Statistics in a Special Figure
One approach would be find a plot (or plots) in the MATLAB Plot Gallery that look similar to what you want, download that code, ...

3 months ago | 0

Answered
run matlab on cloud platform
Yes, there are cloud platform options for running MATLAB. I suggest taking a look at this documentation to get started. (FYI, t...

3 months ago | 0

| accepted

Answered
How do I set a parameter based on individual values in an existing array? Should I use a for loop or something else?
My best guess here is that L is a vector, and you are expecting the if-else logic to work on the entire vector simultaneously. T...

3 months ago | 0

Answered
whats wrong with this code?
In addition to the issues that @dpb mentioned, you also have simple syntax errors in your code. My best guess as to what you in...

3 months ago | 0

Answered
Run section is not working on 2022a
Take a look at my question and answer here. There was a known bug in R2021b (although not exactly what you describe), but I am ...

3 months ago | 0

Answered
How to plot like this????????
There are examples in the documentation for the plot command that are very similar to this, for example: x = 0:pi/10:2*pi; y1 ...

3 months ago | 0

| accepted

Answered
My code won't run, error message :Unrecognized function or variable 'ss'. Error in Q4_109 (line 19) Sys=ss(A,B,C,D);
As you can see, I was able to run your code here. I expect you do not have the ss function, which is in the Control System Tool...

3 months ago | 1

Answered
Datetime won't recognise some cells
Two minor but important changes to your syntax: datetime(data.TimeofDay,'InputFormat','HH:mm:ss.SSS') Note that I used 'Input...

3 months ago | 2

Answered
i want to create a 2 dim matrix which creates 1000 rows vs 1000 columns which will look like a table, if the prime number occur output 1 in the cell and if not prime output 0
I think this does what you want. I used 100 numbers in a 10x10 array to illustrate. Just change N to 1000. N = 10; Prime_matri...

3 months ago | 0

| accepted

Answered
Replace only values in y axis
Does this do what you mean? rng("default") % Data to plot x = 1:10; y = rand(1,10); % 11 arbitrary numeric labels for y...

3 months ago | 0

| accepted

Answered
convert a x y z data(1D) to MxN matrix without having NaN values in Z matrix?
If you are using interp3 (or related functions), extrapolated values will automatically be set to NaN, for some interpolation me...

3 months ago | 0

Load more