Community Profile

photo

Star Strider


Last seen: Today Active since 2012

Hic sunt dracones! PROFESSIONAL: Physician (M.D.): Diplomate of the American Board of Internal Medicine; M.Sc. Biomedical Engineering: Instrumentation, Signal Processing, Control, System Identification, Parameter Estimation NON-PROFESSIONAL: Amateur Extra Class Amateur Radio Operator; Private Pilot, Airplane Single Engine Land, Instrument Rating Airplane; Gamer NOTE: I do not respond to emails or personal messages, unless they are about my File Exchange contributions. Time Zone: UTC-7 (Standard); UTC-6 (Daylight Savings/Summer)

Statistics

All
  • Most Accepted 2021
  • Revival Level 3
  • Personal Best Downloads Level 2
  • 5-Star Galaxy Level 3
  • First Submission
  • Grand Master
  • 36 Month Streak
  • Thankful Level 4
  • Knowledgeable Level 5
  • First Answer
  • Scavenger Finisher
  • Solver

View badges

Content Feed

Answered
How can I make a 3d
There are several ways to do that. One is to use the plot3 funciton, another is the waterfall function. t = linspace(0,5); ...

ungefär 14 timmar ago | 0

Answered
How can I plot this GPS/GNSS signal
Use the plot function.

ungefär 15 timmar ago | 0

Answered
Parameters estimations using lsqcurvefit returning 1 under all circumstances
The system is ‘stiff’. Use ode15s or another stiff solver instead of ode45. I still can’t get it to converge, so I’ll stop h...

ungefär 17 timmar ago | 0

Answered
How to convert fprintf from single row to multiple rows?
There is not enough of the code provided to know what the problem is (and images of code are never appropriate, since actual cod...

ungefär 21 timmar ago | 0

| accepted

Answered
How to copy a matrix but skipping some row and column?
A = randi(99,24) skiprc = [1, 2,4, 6, 8, 17, 19]; copyrc = setdiff(1:24, skiprc) B = A(copyrc, copyrc) As requested! ...

en dag ago | 0

| accepted

Answered
Sum of rows based on time range
Try something like this — T1 = table(datetime('now') + days(sort(randperm(150, 20)))', randi(99,20,1), 'VariableNames',{'Time'...

en dag ago | 0

Answered
Conversion of cumulate day of the year and year into Date/Month/Year
The datetime function is remarkably robust (more so that I previously appreciated)! Try this — D = datetime(1970,1,344) Ch...

en dag ago | 0

Answered
3d plot plotting in 2d and 2d plot plotting in 3d.
The must both plot in 3D, however the ‘z’ value of the 2D plot can be whatever you want (here, 10) — x = 0:0.5:5; y = 0:0.2:2...

en dag ago | 0

Answered
How can I change hisfit curve into 2d gaussian contour plot?
I am not certain what you want. Try this — D = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1...

2 dagar ago | 0

| accepted

Answered
How to detect outliers in the graph
Either use findpeaks on the negative of the ‘y’ vector to get the indices of the valleys, or use islocalmin to get a logical vec...

2 dagar ago | 0

Answered
Rate of Change - Derivative of experimental data
I usually do something like this — dydx = gradient(y) ./ gradient(x); This assumes the independent variable ‘x’ and the depen...

2 dagar ago | 0

Answered
How can I create a curve that will fit my data?
Perhaps — data = sortrows(dataset(:,[1 2]),1); x = data(:,1); y = data(:,2); figure plot(x,y,'Marker','.','MarkerSize',2...

2 dagar ago | 0

Answered
How to set proper configuration to obtain peaks of my data
It would help to have some representative data. However, since the data are resonances, and the desired result seems to indic...

3 dagar ago | 0

Answered
Ho to find the interception
If you simply want to do it yourself, try something like this — xData = 1:150; yData = 50*exp(-(xData-75).^2 * 0.01) + randn(...

3 dagar ago | 0

| accepted

Answered
Delete rows in a string array, if they just contain zeros
It would help to have the data you are working with. With respect to troubleshooting — First, see what the logical statemen...

3 dagar ago | 0

Answered
Plotting a 3D millstone with surfaces
I am not certain what you want. Try something like this — [X1,Y1,Z1] = cylinder(0.2,50); [X2,Y2,Z2] = cylinder(1.0,50); Z...

4 dagar ago | 0

| accepted

Answered
Extracting data from Matlab .fig with 2 different y-axes?
Try something like this — x = linspace(0, 10); y1 = sin(2*pi*x/max(x)); y2 = exp(-0.2*x) .* cos(3*pi*x/max(x)); figure ...

4 dagar ago | 1

| accepted

Answered
Remove noise from time series data
The sgolayfilt function might be a better option. Try something like this — FrameLen = 201; DataFilt = sgolayfilt(data1, 3...

4 dagar ago | 0

| accepted

Answered
How could I program a "for loop" in Matlab to calculate the function's minimum value?
G = @(x,b) x.^2-b.*x+1; b=1:1:5; for k = 1:numel(b) xv(k) = fminsearch(@(x)G(x,b(k)), rand); end xv The first der...

4 dagar ago | 1

Answered
Can somebody help me how can I draw a hemisphere with flat top?
One approach — [X,Y,Z] = sphere(20); figure surf(X, Y, Z) axis('equal') grid on title('Original Sphere') Top = 0.85;...

4 dagar ago | 0

Answered
I have a matrix 592*2 from this I got a curve, now I need to calculate full width half maximum , how to do it?
There are several ways to do this, the easiest being the findpeaks function — B = readmatrix('B_mtx 2022 06 22.txt'); [pkd,lo...

4 dagar ago | 0

Answered
How to add a reference line power law of 1?
The power equation is , so choose independent variable , slope , and intercept and go from there — pwr_y = @(x,m,b) x.^m .* e...

4 dagar ago | 0

| accepted

Answered
How to do get my code to display an answer using f print f. I want to display the result using fprint f
Perhaps this — t_sec=[0 30 60 150 240]; Temp_C=[800 457 269 79 46]; time=0:1:250; pa=polyfit(t_sec,Temp_C,4); Pa=polyval(p...

5 dagar ago | 1

| accepted

Answered
Symbolic rewritten in matlab
An analytic solution is likely not possible, due to the nature of the expression. The only option is to solve it numerically ...

5 dagar ago | 0

Answered
How to downsample a signal
Any resampling is not necessary. Just use the lowpass function to filter out everything above 8 kHz. (Use 'ImpulseResponse','i...

5 dagar ago | 0

| accepted

Answered
What is the x-axis in fft() command?
The x-axis will be frequency, that being defined as cycles/(time unit of the original independent varialble). If that is in sec...

5 dagar ago | 0

| accepted

Answered
Labelling colourbar using Latex
Try this — x = linspace(-3, 3, 50); [X,Y] = ndgrid(x); Z = exp(-(X.^2+Y.^2)); figure surf(X, Y, Z) grid on hcb = color...

5 dagar ago | 0

| accepted

Answered
Import data into datetime format
It would help to have the file and the MATLAB release you are using. It would be better to use readtable if you have it. Also,...

6 dagar ago | 0

Answered
How to calculate the FWHM from multiple spectra?
It might be easier if we had one or two typical .csv files to experiment with. The findpeaks WidthReference option is 'halfp...

6 dagar ago | 1

| accepted

Answered
Designing Filter for Accelerometer
The data are not regularly-sampled, so in order to do any meaningful signal processing on them, they need to be resampled to a c...

6 dagar ago | 0

Load more