Answered
How to take average of matrices stored as cell array?
If and only if all matrices are the same size, you can concatenate them along the 3rd dimension and then average along the 3rd d...

5 years ago | 0

| accepted

Answered
Not enough input arguments.
yp = [a*y(1)-b*y(1)*y(2);-c*y(2)+d*y(1)*y(2)]; That line assumes a, y, b, c,and d are defined. The variables a, b, c, and d ar...

5 years ago | 0

| accepted

Answered
How do I change the position of the axes permanently?
You have to either hold the axes after setting the axis location or set the axis location after plotting. ax = subplot(1,2,1);...

5 years ago | 0

Answered
addlistener for drawrectangle to trigger when the rectangle is first drawn
How to add listener that responds to the first time drawrectangle is called For instructions on how to implement this in AppDes...

5 years ago | 0

Answered
Saveas figure (UIAxes) from app designer to a specific folder left and right plots
You must be referring to this answer which contains a link to the function on the file exchange. copyUIAxes(handle,parent) Ma...

5 years ago | 0

| accepted

Answered
Move Longitude axis above scatterplot
I looked for something analogous to XAxisLocation in geoaxes but couldn't find anything. Here's a workaround until this featur...

5 years ago | 1

| accepted

Answered
what is the error with my code
> what is the error with my code The error is, N = 4; x = [ 3 4 5 6 ]; for k = 0 : N-1 for n=0:N-1 sum = sum ...

5 years ago | 0

Answered
How to find timeseries averages over several files.
This version is less clumsy and more efficient but does not reduce the size of T_data. file = {'Temperature_Data1.csv','Temper...

5 years ago | 0

| accepted

Answered
Finding 8 day averages for timeseries data
Convert your data to a timetable and use retime to compute monthly/yearly/8-day averages (also see array2timetable). If you ha...

5 years ago | 0

| accepted

Answered
Customizing scale of x-axis
Set the XScale to log and then specify the x-ticks. Demo: x = [250 500 1000 1500 3000 4000 6000 8000]; y = rand(size(x)); ...

5 years ago | 0

| accepted

Answered
Add Numbers to the End of a Table
> _if the participant number is 10, I want to make it so that the name of the table is sample_x_coord_table_10._ Your descri...

5 years ago | 0

Answered
Interpolating between two 3d time dependent positions
There are multiple ways to do this. Here I show how to put your (x,y,z) coordinates into a timeseries and use resample to inter...

5 years ago | 1

| accepted

Answered
Best way to calculate elliptical trajectory
Existing code % earth ref spheroid wgs84 = wgs84Ellipsoid; % Aircraft location lat_aircraft = 45; %deg lon_aircraft = 8; ...

5 years ago | 0

Answered
How can I show 10 pixels width in all directions for an image?
Clarified question in comment below: > want to display the same image below but half colored and half binary! Follow the step...

5 years ago | 0

Answered
Connecting points of two scatterplots
DEMO Create data x1 = sort(rand(1,10)*10); x2 = sort(rand(1,10)*10); y1 = rand(1,10)*2; y2 = rand(1,10)*4; Create scatt...

5 years ago | 0

Answered
How to find position of a new point along a series of line segments?
For collinear points, XY = [1 1; 2 1; 3 1; 5 1; 9 1]; Q = [7 1]; XYQ = sortrows([XY;Q]) For coordinates along a non-linear...

5 years ago | 0

| accepted

Answered
Bars disappear with log scale
Reproducing the problem Well, that's interesting. The plot on the left shows the bar plot with a linear y-axis and the plot on ...

5 years ago | 0

| accepted

Answered
I have problem with this part of the code txt = [txt ' ' ocr(SUBs_I{T})];
txt = ocr(I) returns an ocrText object, not a character vector, string, or any form of text. When you get this type of error, e...

5 years ago | 0

Answered
increase or decrease "RowNames" column - table
To set row-name column width to auto-fit the row-label-width: If your goal is to fit the row name column to the width of the la...

5 years ago | 0

| accepted

Answered
Customise Colours in stackedplot
> "I have this figure here, and I need to change the line style of the 2 horizontal images in (b) online. The command s.LineProp...

5 years ago | 0

| accepted

Answered
sinh(ax) plot
If this is something the documentation doesn't answer you'll have to elaborate. We don't know what "a" is in your question. <...

5 years ago | 0

| accepted

Answered
Log Color Scale command doesn't work
Axes do have a ColorScale property (see documentation). What type of axes and what Matlab release are you using? % Matlab R2...

5 years ago | 0

Answered
Add 2nd horizontal axis to plot
To create axes using tiledlayout you should use nexttile to create the primary axes (see this answer). To create multiple x-ti...

5 years ago | 0

| accepted

Answered
input string data in the function
You're not using the contry1 variable at all in your function. Instead, you've replace it with a character vector 'county1' whi...

5 years ago | 0

| accepted

Answered
how to plot 2D contour lines from the data file
Contour plots require z to be a matrix. contour(Z) You can define the x and y values, too, and they can be vectors or matrices ...

5 years ago | 0

Answered
How to create multiple strings
Don't use eval() at all. 💀💣 Matlab documentation: Alternative eval() Matlab Fandom: Why is it advised to avoid using the "eval...

5 years ago | 1

Answered
How can I run multiple iterations that plot on the same graph?
Using a vector of values x, y is an mxn matrix for m values in Dl and n values in x. Please read Array vs matrix operations. ...

5 years ago | 1

Answered
how to plot all points
Vectorized version... pstep=20; freq = 20:150; maxfreq = 150; tend = maxfreq - freq; itime = cumsum(1./ (pstep.*freq));...

5 years ago | 1

| accepted

Answered
2 yaxis in a tiledlayout
Check out the examples from the documentation. When using Tiledlayout, axes should either be created using nexttile or after yo...

5 years ago | 0

Answered
Plot ellipsoid with only principal section lines
This solution produces a white ellipsoid surface with transparency so that lines in the back are faded. Then it adds the major ...

5 years ago | 0

| accepted

Load more