Beantwortet
How to plot this diagram?
A good function where you specify some co-ordinates and get a filled region is fill (I did a very bad job replicating your shape...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
How to calculate difference between a vector
I think you're asking how to take the values [4 8 6 104 5] and subtract the mean? a = [4 8 6 104 5]; b = a-mean(a)

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Subset Table using an array of strings
I think you want list_of_cols = {'col1' 'col2'} or list_of_cols = ["col1" "col2"] because list_of_cols as you wrote it ev...

mehr als 4 Jahre vor | 0

Beantwortet
Can't use user input and eval() to add a row to a table within a structure.
First of all, this is not a good way to do things. In general, if you find yourself using eval, you should stop and rethink the ...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
why if elseif statement is not working
This expression: va(i)>207 | va(i) <253 asks whether the value is greater than 207 or less than 253. All values (other than Na...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Calling table from matlab workspace as input for function
when you call a function, you're passing in some values to be used in the function. So when you have: [m1,m2]=IRmax(FILENAME,17...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Make x axis values not overlapping
You can make this kind of (multi-row) labelling work by relying on the TeX interpreter. Note this answer is a total rip-off of t...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
3D array, remove columns where second array == -1
From what I can see here, you've got a logical vector called toRemove, and you want to remove columns where toRemove is true fro...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Using structures in functions within for loop
In your example, you have a bunch of values for V (i.e. a 1 x 10 vector) and single values (i.e. scalars) for A and B. Do you wa...

mehr als 4 Jahre vor | 0

Beantwortet
Dynamically calling variables (it's not what this sounds like!)
I think, if I read your question correctly, you're saying: You have files with a suffix The suffix determines the names of var...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Save figures from for loop into a subfolder of the current folder.
To make the figures not appear, I'd set their Visible property to 'off' I'd also recommend exportgraphics on releases since 202...

mehr als 4 Jahre vor | 1

Beantwortet
How to take ascii file and plot into scatter plot?
readtable will do well to read in the file converting it to categorical will make it easier to make a bar out of reordercats w...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
extracting and filtering images from a 3D matrix?
If you have a 3d matrix, can you do this simpler approach? [edit: updated for the first dimension being slice/image] nfr = nan...

mehr als 4 Jahre vor | 0

Beantwortet
How to group values in different indexes (in a matrix) together.
Yes, if you want 010 to not be 10, it can't be a double... You didn't describe what should happen with the last triplet, as 400...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
A new figure is coming out while plotting inside a for loop in App designer.
Short answer, replace: grid on with grid(app.UIAxes_animation, 'on') Long answer, if you look at this section of code: ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
group numbers in cells
I think you're asking how to go from cells that have a sort of group-id in the first column to recombined cells that all have th...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
What is '1butter' in this Wiener Filter code?
I'm guessing it's just supposed to be butter, there's no function in MATLAB called 1butter, and there couldn't be because number...

mehr als 4 Jahre vor | 0

Beantwortet
remove rows in table based on different string across columns
You have a couple of bugs: You need to write contains twice: it's not contains(thing,otherthing) & thing2,otherthing2 but inste...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Merge all figures into one plot
tiledlayout and nexttile is a good alternative to subplot and gives you a little more control over the spacing between plots. It...

mehr als 4 Jahre vor | 0

Beantwortet
How to create points in a matlab plot from cursor position click
What you're describing is a callback function that adds a point, here are the ingredients you'll need: a callback function: som...

mehr als 4 Jahre vor | 1

Beantwortet
How to split a column matrix into N parts
reshape is a great way to do this: x=rand(100000,1); y=reshape(x,1000,100); y1=reshape(x,1000,[]); % Because the 100 is deter...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Add a .png Image multiple times in a graph
You can call image multiple times, specifying your x and y separately with a few caveats: You'll need hold on to prevent wiping...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
can someone lead me how to make such a plot?
You can make plots like this with the errorbar function. However you'll have to think about the math that's appropriate to defin...

mehr als 4 Jahre vor | 0

Beantwortet
Fill the area between two curves
I'm surprised that the solutions you tried didn't work... I think these are often easiest with fill, and I like to think of the...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Convert from Coordinated UTC to datetime?
You can do this easily with datetime: x=1.511092230713565e+05; % The date part is the part before the decimal, so use floor ...

mehr als 4 Jahre vor | 0

Beantwortet
Is it possible to get minor grid lines to show when using datetime along x axis?
You can absolutely have minor grid/ticks with a datetime x axis, but you'll need to pick your own minor tick values: unixtime...

mehr als 4 Jahre vor | 2

Beantwortet
Write cells to individual excel sheets
I think with xlswrite you specify just the sheet, no need to use the keyword 'sheet' xlswrite(Fnane, PD_adpt{ii}, sheet_names(i...

mehr als 4 Jahre vor | 0

Beantwortet
If statement inside a while loop MATLAB
All of those else if should be elseif. https://www.mathworks.com/help/matlab/ref/if.html rainfall_values=[39.9 31.0 42.3 42....

mehr als 4 Jahre vor | 0

Beantwortet
How to fill a 2D plot?
You can use the fill function to fill a region. You can retrieve the x and y values using real and imag (I don't think fill does...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
How to plot a plot that has multi coordinates in one x coordinate?
A good strategy for these kinds of plots is to treat it as if the numbers are 1 to 15, and then just change the labels y=rand(1...

mehr als 4 Jahre vor | 0

| akzeptiert

Mehr laden