Answered
how can I make a custum legend in a second figure?
It is difficult to follow your code. One optioni would be to use the 'DisplayName' name-value pair as described in Specify ...

2 years ago | 0

| accepted

Answered
How to get different sizes of horizontal and vertical error bars?
One option would be to use: axis equal or: axis('equal') There is no obvious way to scale them otherwise.

2 years ago | 0

Answered
Image display error when using surf
MATLAB 7.1 was introduced in 2006. I cannot find any documentation for the Signal Processing Toolbox for it (that likely explai...

2 years ago | 1

| accepted

Answered
getting a clear signal with eog
One option I like for these sorts of signals is the Savitzky-Golay filter (sgolayfilt). I generally use a 3-degree polynomial,...

2 years ago | 1

Answered
uncertainty in polyfit from measurements?
When this post first appeared, polyparci did not exist. It does now. It may be helpful.

2 years ago | 0

Answered
Supplied objective function must return a scalar value
The function needs to return one parameter vector. One way to do that is to create a second function to map the inpouts to ...

2 years ago | 0

| accepted

Answered
High pass filter on cumtrapz
The ‘acceleration’ signal has a constant offset of about 1.03, so the integration is going to emphasize the offset and not the i...

2 years ago | 0

| accepted

Answered
how to create table Date/Value
The unstack function works here. Try this — LD = load('matlab_data.mat') T1 = table(year(LD.dat),month(LD.dat,'short...

2 years ago | 0

| accepted

Answered
Labelling Curves on a Graph, This code worked a decade ago, but will not work in 2023a
Looking at the current clabel documentation, the second argument to it has to be the second output of the contour call. It is l...

2 years ago | 0

| accepted

Answered
I want to break down my 3d graph into 2d graphs.
The easiest way to do this is with the view function. Use ‘view(90,0)’ for the ‘x-z’ view, and ‘view(0,0)’ for the ‘y-z’ vie...

2 years ago | 0

| accepted

Answered
Fitdist gives wrong answer
The and values are in log units. Calculatee their exponentials — Add=16 %%info given in question 4 River_flood_level=[516...

2 years ago | 0

| accepted

Answered
Question about gain scalar in sos2zp
When I checked that with some code I wrote for a different problem, ‘k’ and ‘G’ are scalars with the same values. Fs = 1E+3; ...

2 years ago | 0

Answered
How to find uncertainties in the coefficients of polyfit
An earlier version of my polyparci function already existed when this question originally posted. It calculates the confidence ...

2 years ago | 1

Submitted


polyparci
POLYPARCI calculates confidence intervals for parameters estimated by ‘polyfit’.

2 years ago | 7 downloads |

4.8 / 5

Answered
How to find the gradient of plotted values?
Use the gradient function to calculate the numerical gradient/derivative — Fs = 100; L = 60; t = linspace(0, Fs*L, Fs*L+1)/F...

2 years ago | 0

Answered
freqz() magnitude plot behavior for estimated filter coefficients
The third argument to freqz (when the first two are the transfer function coefficients, different with a second-order-section m...

2 years ago | 0

Answered
How to change the graph type
I believe that this is reasonably close — num_simulations = 10000; %Common parameters Discount_Rate_min = 0.06; % assu...

2 years ago | 1

| accepted

Answered
How can I plot the streamlines in all region around the inside sphere ?
One approach is to change the code to add a patch object in this part of it (add ‘pv’ and ‘cv’ and the patch call): set(polar(...

2 years ago | 1

| accepted

Answered
matlab 'unique' is skipping rows with data
I am not certain what the problem is, however if you want to test for more than one value in a row, specify that with the 'rows'...

2 years ago | 0

Answered
How to convert 30s daily data into hourly data using MATLAB?
It would be nice to know what version you are using. Are you supposed to accumulate (for example take the mean) of the data ove...

2 years ago | 0

| accepted

Answered
Script of importing data not working with no warning or error
The function does not produce any outputs. You will need to declare: global ExperimentalIVData in your calling script to g...

2 years ago | 1

| accepted

Answered
Butterworth Bandpass filter implementing
There is actually not enough information provided. However in my experience, a generally accepted sampling frequency for EEG is...

2 years ago | 2

Answered
calculate the volume of a patch object
Perhaps first using alphaShape and then volume will do what you want.

2 years ago | 0

Answered
I cannot get fplot to plot my piecewise function past an x-axis value of 5
The default independent variable limits for fplot are (-5,5). If you want a larger or different independent variable value, te...

2 years ago | 0

Answered
Fit of a function with a weighted sum
@Camilla Bandinelli — Responding to your email, first thank you for clarifying my concerns, especially with respect to the ‘trai...

2 years ago | 0

Answered
csv reading related matter
Thje problem is your not taking full advantage of MATLAB table arrays and everything they can do. Try this — Uz = unzip('2...

2 years ago | 0

| accepted

Answered
Plot label with text function
All the ‘matched_data.intensity’ entries are all set to 1, so they all plot at 1 rather than the peak values. A way to correct ...

2 years ago | 0

| accepted

Answered
Changing colour of regression line in a scatter plot
Using the lsline function to draw the linear regression — x = (0:99); y = 3*x + randn(size(x))*25 + 15; figure plot(x, y...

2 years ago | 0

| accepted

Answered
Polarplot, how to delete outmost circle (axis) and message
The extra circle outside the magnitude 1 circle is the result of specifying this: P.MagnitudeLim=[0 1.05]; If you remove that...

2 years ago | 0

| accepted

Answered
Averaging across subjects EEG
I do not know what your approach is. My approach in Combining repetitive curves into one average curve would likely work with...

2 years ago | 0

Load more