Beantwortet
Smoothing a noisy signal
Experiment with this approach — LD = load(websave('pressure','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1...

mehr als 3 Jahre vor | 0

Beantwortet
How can I access Ydata from interaction plots?
Using an example from the interactionplot documentation — rng default; % For reproducibility y = randn(1000,1); % Rand...

mehr als 3 Jahre vor | 0

Beantwortet
Changing a parameter in a trasferire function
I demonstrated this in your earlier post: How to change a parameter in a model. The same approach applies here — s = tf('s'...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how to plot a mean line in a plot
‘I need to mean line to be at the same angle as my fluctuations.’ You apparently want the linear regression of ‘u1’ as a functi...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
3D mesh plot
The ‘x’ vector is missing a ‘30’ value (supplied here). I get a different result when I plot those data — x = [0 10 20 30 0...

mehr als 3 Jahre vor | 0

Beantwortet
How to change a parameter in a model
Try something like this — A = @(h,k) [ -1 0 0; -1 h k; 0 0 -3]; % Create As Anonymous Function B = [ 1; 1; ...

mehr als 3 Jahre vor | 0

Beantwortet
How to Smooth signal data to find clean peaks
I am not certain what you want. One option is simply to use a lowpass filter, then adjust the ‘CutoffFreq’ variable until you ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
3d plot from knows XYZ
It will be necessary to interpolate them to create a surface. There are seeral ways to interpolate them, my favourite being t...

mehr als 3 Jahre vor | 1

Beantwortet
Data fitting to a function that has the dependent y variable on both sides of the equation
I would do something like this — x = (1:10).'; y = rand(size(x)); B0 = rand(3,1); [B,fval] = fminunc(@(b)norm(y - b(1).*s...

mehr als 3 Jahre vor | 0

Beantwortet
Trend lines with moving average
It is unlikely that it is posssible to get any meanigful information from these unless they are first sorted. LD = load(websa...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
60 years of daily data; need to group separately by month and year
One approach for the mean values — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1307475/Flow...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to sort data in a bar plot based on its values on Y-axis?
I assume the x-data are categorical, because otherwise this is straightforward. Perhaps this — x = 1:5; y = rand(1,5); xl...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
LogLog Plot is Blank
Use element-wise division: y = (B.*x)/((log(A.*x) - log(log(1 + 1/GamSE)))*dM); ↑ ← HERE and it works! %Paschen...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Can integral3 be used to have integrals over 9 variables?
A 3D vector would seem to me to be a 3D matrix. If so, trapz used repetitively on each dimension of the matrix would likely be ...

mehr als 3 Jahre vor | 0

Beantwortet
plot a graph from user input
Use the inputdlg function instead. You can list everything you want responses to in one call to it, and even create default opt...

mehr als 3 Jahre vor | 0

Beantwortet
I would like to count the number of peaks of a signal.
Use the signal Processing Toolbox findpeaks function to count the peaks. The plotted signal does not appear to be noisy, so it ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How make a high pass filter and give input to it simultaneously?
‘There are functions on matlab like Highpass but it doesn't pass an input signal into it.’ Yes, it does! The input signal ...

mehr als 3 Jahre vor | 0

Beantwortet
Fixing fzero in standard normal distribution
Change the initial parameter estimate to something other than 0. The fzero function is a root-finding algorithm, so it looks fo...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Choose frequency to plot and create sound
These frequencies are going to be too low to hear, so consider multiplying them by perhaps 100 in the sound call. Fs = 44100...

mehr als 3 Jahre vor | 0

Beantwortet
How can I add error bars to a stacked plot?
A (slightly tortured) tiledlayout array might work — x = 0:0.5:10; y = randn(3,numel(x)); err = randn(3,numel(x))/5; figu...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Save results if fminsearch in a table or m.file
I assume that ‘a’, ‘xi’, and ‘phi’ are parameters returned (in that order) by fminsearch. If so, then perhaps this — U_v...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
lsqnonlin providing very poor model fits
With a few edits to make it more efficient, this seems to work — A=lsqnonlin(@insulin_prediction,[2 2 2 2],[0 0 0 0]) functio...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
butterworth and baseline removal filtering
The ‘baseline wander filter’ is a bandpass filter with a passband of 0.5 to 15 Hz. (This is too restrictive in my opinion. The...

mehr als 3 Jahre vor | 0

Beantwortet
How to use Nlinfit for a function with two independent variables?
You are using the correct approach with: xm=[x1 x2]; In the function, refer to ‘x1’ as ‘xm(:,1)’ and ‘x2’ as ‘xm(:,2)’ , pas...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Warning: Error updating FunctionLine. for fplot
Evaluate all the functions. Try this — y1 = 0; addi = 0.05; aoamid = (2*0.6*sqrt(1-((y1)/4)^2)/(pi^2)+0.6/(8*pi)) CLnew ...

mehr als 3 Jahre vor | 0

Beantwortet
Having trouble creating a for loop for this code. I want to use a for loop instead of having five commands as seen in the code.
Perhaps — prefx = {'r','f','g','l','x'}; for k = 1:numel(prefx) data{k} = load(sprintf('%s.dat',prefx{k}) end prefx = ...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Grouping Categories in Scatter Plot
The gscatter function may be appropriate. Is this the correct file? These don’t appear to have anything to do with rivers (a...

mehr als 3 Jahre vor | 0

Beantwortet
R2022B Update4 is not offered
Try this — Get R2022b Update 4 That’s where I had to go to get it. .

mehr als 3 Jahre vor | 0

Beantwortet
matlab does not plot the time series
The problem is that ‘velocity_jonswap’ is uniformaly NaN. This is causec by a ‘0/0’ , ‘Inf/Inf’ or NaN values in the data used ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how can i plot including sym data in graph?
Thia approach works — fs=3000; t= 0 : 1/fs : 10; t = 0: 1/fs : 2.5; % Substitute To A...

mehr als 3 Jahre vor | 0

| akzeptiert

Mehr laden