Community Profile

Star Strider

11,984 total contributions 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.

View details...

Contributions in
View by

Condition for matlab if
I suspect that here: PP=Wscat((g(i)-50:g(i)),i) ; % Error Subscript indices must either be real positive integers or logicals...

4 hours ago | 0

Contourf isoline in logarictmic scale
Plotting it as: contourf(log(abs(Z))) or: contourf(log10(abs(Z))) is likely the only option. The problem is that the cont...

5 hours ago | 0

hourly mean - why do I get the following error
The problem may be that you’re running your code in the Command Window. When I run it in a script, it runs without error and ...

15 hours ago | 0

can you write a vector function?
You pretty much wrote it yourself: x = @(u,v) [2-v.*sin(u/2).*sin(u); 2-v.*sin(u/2).*cos(u); v.*cos(u/2)]; See the documenta...

17 hours ago | 0

| accepted

Issue solve function using complex numbers
I cannot figure out the reason solve is not solving for those values. I ended up with this: Rfcn = matlabFunction(Zeq) Rr(...

1 day ago | 0

Marking a single point on a graph
This first finds the approximate indices for the zero-crossings, then interpolates to find the exact values: sigma_x = 8; sig...

1 day ago | 0

| accepted

Interpolation when y data is not strictly a function of x
I am not certain what you want to do. Your data appear to be hysteresis curves. It is straightforward to fit them, using my ...

2 days ago | 0

| accepted

Plot a curve with coordinates
Without knowing what your data are, this will plot the peak and valley values as a functions of the indices: figure plot(inde...

2 days ago | 0

How to represent a chaotic trajectory in MatLab?
I remember this system. I do not know what you intend by ‘chaotic trajectory’ here. If you want to plot the derivative of ‘k...

2 days ago | 0

| accepted

finding prominent maxima and minima of a column vector
Although findpeaks needs some help here, it can find all four: [D,S] = xlsread('ab1.xlsx'); [pks,plocs] = findpeaks([D(:,2)...

3 days ago | 1

| accepted

Changing color of graphs in MATLAB plot
With 7000+ curves, it is unlikely that you are going to be able to distinguish them regardless of the colormap you use. I wou...

3 days ago | 2

| accepted

How do you remove specific rows from a cell array?
One approach: C = {{'myPC\Documents\MATLAB\DataAnalysis\temp\6\Temp-20\TS1.csv' } {'myPC\Documents\MATLAB\DataAna...

3 days ago | 1

| accepted

How to represent the followind ODE system in MatLab?
Define ‘y’ as ‘x(1)’, ‘k’ as ‘x(2)’, and code it using those substitutions. (I coded it as a one-line anonymous function.) R...

3 days ago | 0

| accepted

plot quiver onto the base of a 3D plot
This seems to approximate what I believe you want: [x,y] = meshgrid(-80:80, -80:80); z = -(cosd(x).^2 + cosd(y).^2).^2; mesh...

3 days ago | 1

| accepted

How to add equation to function
Except for your ‘rocket’ function, most of that looks as though it should work. Leave out the subscript reference when you ar...

4 days ago | 1

How to make a matrix from a for loop
If you need to do it with the loop, this works: t = 0:2:100; for k = 1:numel(t) h(k) = rocket(t(k)); if h>=0 ...

4 days ago | 0

| accepted

plotting root of Polynomial Equation
You need to extract the double arrays from the cells in ‘EQ’: plot(p,real([EQ2{:}]),'-', p,imag([EQ2{:}]),'--') The cell2mat...

4 days ago | 0

| accepted

text scan question of amplitude and phase
Try this: c = {'-7.30313259052058e-002dB,-4.26354774426478e+000°'}; D = textscan(c{:}, '%fdB%f°', 'Delimiter',',') producing...

4 days ago | 0

How to Name Columns in a Table?
That looks like it should work. Try this: B = array2table(y) first, to be sure that all the columns in ‘y’ are actually be...

4 days ago | 1

| accepted

How to isolate one pulse from a periodic pulse train
One approach: t = linspace(0, 2.3, 500); % Time Vector pulses = -0.1...

4 days ago | 0

| accepted

It is the correct result, although it may not be the one you were anticipaiting. Try this: syms x f(x) = sin(x)+2*cos(x) ...

4 days ago | 0

| accepted

How to determine the delay between two signals representing a single transition
There are several possibilities. One of course is the finddelay function and its friends. Others are findchangepts and ischa...

4 days ago | 0

| accepted

transfer p value to z value
Use the norminv function. If you do not have the Statistics and Machine Learning Toolbox, y9ou can use this anonymous functio...

4 days ago | 0

Can't load .mat file from subfolder
See: Can't load .mat file from subfolder

4 days ago | 0

Can't load .mat file from subfolder
All the subdirectories on your MATLAB user path must be included in the path definitions. See: What Is the MATLAB Search Path? ...

4 days ago | 0

morse code encoder with sound
If you change the ‘morsecode2’ assignment and cast it to a char rather than string data type, it works: morsecode2 = morsecode...

5 days ago | 0

| accepted

Calculate mean from plot of two vectores
In order to calculate the mean, the y-coordinate data would have to be interpolated to the same x-coordinate values, those spann...

5 days ago | 0

Obtaining integral function from code
At that value, the subscript is no longer an integer. This is most likely a problem with floating-point calculation error. Usi...

5 days ago | 1

| accepted