Answered
Using lsqcurvefit to fit experimental data to a kinetic reaction system of 4 ODEs
You seem to be estimating only one parameter, ‘n’, rather than it and the ‘k’ parameters. I admit to being a bit lost, since th...

6 years ago | 0

Answered
How to remove outliers from data set
Try this: flintLead=[0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 ... 4 4 5 5 5 5 5 5 5 ...

6 years ago | 0

| accepted

Answered
how to paint a circle?
Try this: x1=@(x) 6+sqrt(2-(x-1.5)^2); x2=@(x) 6-sqrt(2-(x-1.5)^2); hold on v1 = fplot(x1, [0 15]); v2 = fplot(x2,[0 15]);...

6 years ago | 0

| accepted

Answered
How can I force simplify function I want?
Tell MATLAB to keep slimplfying until it cannot simplify it further (or reaches the iteration limit), then test equality with th...

6 years ago | 1

| accepted

Answered
The directory name is invalid
I would delete the current desktop icon first. Then in File Explorer, navigate to C:\Program Files\MATLAB\R2016a\bin then rig...

6 years ago | 0

| accepted

Answered
Compare two vectors and keep only equal values
If you want an exact match, experiment with the ismember function. If you want an approximate match (within a tolerance value),...

6 years ago | 0

| accepted

Answered
Intersection between two curved lines
The part of the code after X = [xpA;xk;xpB]; Y = [ypA;yk;ypB]; changes to: b = po-ap; x = X(1); X1 = X-x; Y1 = Y+b; X2...

6 years ago | 1

| accepted

Answered
How to find intersection points of a vector-valued curve and a function?
It is likely easiest to evaluate the function, then interpolate to find the intersection. Example — x = linspace(0, 2); ve...

6 years ago | 0

Answered
Setting default values for bodeoptions
See if the setoptions function will do what you want. Beyond that, I doubt there is a way to set the defaults. The closest i...

6 years ago | 0

Answered
How can I get all my figures out of a for loop?
I cannot run your code, expecially sinced I do not know anything about the data you are using with it. One option might be: ...

6 years ago | 0

Answered
how to define a function handle if i need to define a function from R^n to R?
I am not certain what you are doing or what result you want. Try these to see which one gives you what you want: fr = @(x) ...

6 years ago | 0

Answered
Calculating euclidean distances in a matrix
Use the pdist function, then squareform. Example — x = randi(99, 5, 2); % Create Matrix ...

6 years ago | 0

Answered
FFT to convert time series data into frequency domain
Experiment with this: s = readmatrix('dec.txt'); L = numel(s); % Signal Length F...

6 years ago | 0

| accepted

Answered
R Squared Value in newrb
It’s easy enough to calculate. See the Wikipedia article on Coefficient of determination for the relevant expressions.

6 years ago | 0

Answered
How can I recover Matlab files?
For what it’s worth, I had a desktop crash a few months ago. Fortunately, the C:\ drive was a SSD, and I was able to get a USB ...

6 years ago | 0

Answered
Rotate a line profile to remove the tilt (make it horizontal)
Use the detrend function. Specifically see the documentation section on Continuous Linear Trend , although other examples may b...

6 years ago | 2

| accepted

Answered
How can i detecting and marking wheezes on a plot?
I have no idea what you are asking. Taking a guess, to add annotations to your plot, the easiest way is to use the text funct...

6 years ago | 0

Answered
Low pass filter with butter does not filter the signal and decreses scale
Two problems that I see, just looking at your posted code: First, [b,a] = butter(n,wn,'low'); ‘wn’ is already normalised, s...

6 years ago | 1

Answered
I can't find legend in plot
Unless you specifically used the approach in Remove Legend Background to remove the box, you are encountering a problem with ce...

6 years ago | 0

| accepted

Answered
Writing a new function
I just used the first file. Try this: c = 1; Dataset(c).T = readtable('T1 Centripetal acceleration 2020-12-07 10-23-09.xls...

6 years ago | 0

Answered
How to edit a text file using MATLAB?
Try this: textfile = {"1981-02-01",15.3 "1981-02-02",18.8 "1981-02-03",21.9 "1981-02-04...

6 years ago | 0

| accepted

Answered
how to plot digital signal with binary random sequence ?
The stem function is usually appropriate for such plots.

6 years ago | 0

Answered
Generating matrix with ones and zeros
Use the blkdiag function: v = ones(1,3); x = blkdiag(v,v,v,v) .

6 years ago | 2

| accepted

Answered
How to store structures from a for loop
I had to look up that function, since I do not have the Econometrics Toolbox. (I added that to the Products tags.) Many of t...

6 years ago | 0

Answered
Power estimation using PWelch
If you want the power spectrum as simple uints of power as a function of frequency, use the fft function. To convert amplitude ...

6 years ago | 0

| accepted

Answered
getting a specific column from a table, Part 2
Try this: cols = T{:,[3:35 37]}; .

6 years ago | 0

| accepted

Answered
Why is my plot not showing?
I cannopt run your code. I suspect most of ‘S’ are NaN. Try this: NaNs = sum(isnan(S)); I suspect they will all be equa...

6 years ago | 0

Answered
Find intersection between two llines
Add these lines to find the intersection: x_ER = interp1(mass_flow_corrected - m_compressor, E_R, 0); y_ER = A_eff.*((k./R).^...

6 years ago | 1

| accepted

Answered
Area under gaussian curve
Define ‘gauss’ as: gauss = @(x,amp) amp*exp(-(((x-mu).^2)/(2*sig.^2)))+vo; and: arear_under_crve = @(amp) integral(@(x)gaus...

6 years ago | 0

| accepted

Answered
Cumulative distribution function of vector -doesn't work correctly
The code is working correctly. All the values in ‘oh2’ are extremely small and close together, and there are only 29 unique val...

6 years ago | 0

Load more