Respondida
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...

alrededor de 5 años hace | 0

| aceptada

Respondida
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...

alrededor de 5 años hace | 0

| aceptada

Respondida
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);...

alrededor de 5 años hace | 0

Respondida
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...

alrededor de 5 años hace | 0

Respondida
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...

alrededor de 5 años hace | 0

| aceptada

Respondida
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...

alrededor de 5 años hace | 1

| aceptada

Respondida
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 ...

alrededor de 5 años hace | 0

Respondida
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...

alrededor de 5 años hace | 0

| aceptada

Respondida
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...

alrededor de 5 años hace | 0

| aceptada

Respondida
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)); ...

alrededor de 5 años hace | 0

| aceptada

Respondida
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...

alrededor de 5 años hace | 0

Respondida
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...

alrededor de 5 años hace | 1

| aceptada

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

alrededor de 5 años hace | 0

Respondida
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...

alrededor de 5 años hace | 0

Respondida
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...

alrededor de 5 años hace | 0

Respondida
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...

alrededor de 5 años hace | 0

| aceptada

Respondida
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 ...

alrededor de 5 años hace | 0

| aceptada

Respondida
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...

alrededor de 5 años hace | 0

Respondida
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...

alrededor de 5 años hace | 0

| aceptada

Respondida
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...

alrededor de 5 años hace | 0

| aceptada

Respondida
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. <...

alrededor de 5 años hace | 0

| aceptada

Respondida
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...

alrededor de 5 años hace | 0

Respondida
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...

alrededor de 5 años hace | 0

| aceptada

Respondida
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...

alrededor de 5 años hace | 0

| aceptada

Respondida
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 ...

alrededor de 5 años hace | 0

Respondida
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...

alrededor de 5 años hace | 1

Respondida
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. ...

alrededor de 5 años hace | 1

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

alrededor de 5 años hace | 1

| aceptada

Respondida
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...

alrededor de 5 años hace | 0

Respondida
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 ...

alrededor de 5 años hace | 0

| aceptada

Cargar más