Community Profile

# Star Strider

11,637 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

What does "a3.XTick" do to plot the cross-correlation on MATLAB ?
This assignment: a3.XTick = sort([-3000:1000:3000 lagDiff]); sets the 'XTick' values of the current axes (denoted here by ‘a3...

2 hours ago | 0

Plotting graphs for scientific journals
Yair Altman’s export_fig (link) is highly regarded.

4 hours ago | 0

what function can be used to divide matrixes with n length
The must both be the same length, and ideally the same row and column sizes. M = x ./ y Note the ‘./’ denoting element-wise ...

5 hours ago | 0

How can I don't display the x values labels in heat map?
Try this: data1 = randi(9, 3); figure h1 = heatmap(data1); cdl = h1.XDisplayLabels; % ...

5 hours ago | 0

| accepted

simple code for the log computation
Since ‘X’ is a cell array, you first must convert it to a double array, here using ‘[X{:}]’: X = { 1, 2, 3, 5, 6}; M = log10(...

5 hours ago | 1

Quiver plot arrows hidden by surface plot?
I was considering something like this: x = linspace(-pi, pi, 20); h = x(2)-x(1); [X,Y] = ndgrid(x); Z = sin(X) .* cos(Y); ...

21 hours ago | 0

| accepted

Left and right sides have different number of elements
Both ‘R_e’ and ‘k’ are (1 x 10) vectors, so ‘f’ will also be a (1 x 10) vector. Try this: f(counter,:)=pipe(R_e,k); With t...

1 day ago | 0

| accepted

Linear Regression Code Formula
The polyfit function creates a least-squares fit of the data to a polynomial, given the independent and dependent variable data,...

1 day ago | 0

| accepted

how to generate a vector of zeros with 2 random successives cell containing ones
I have no idea what you want. Try this: z = zeros(1, 20); % Vector Of 20 Zeros idx = randi(n...

1 day ago | 0

Remove or hide the special Y-axis label
Change your axis call to: axis([0 8 0.94 1]) That should do what you want.

1 day ago | 0

| accepted

Parameter estimation in ODE
You are trying to fit 5 columns of your differential equation to 4 columns of data. That will throw the error you got. Chang...

1 day ago | 0

| accepted

How to remove NaN values from an array
Since you want the lines to be continuous, consider using the fillmissing (link) function to fill in the NaN values with numbers...

2 days ago | 0

| accepted

How do I output to the command window where the sum of the bars on the graph equal zero along the x axis
If fyou are referring to ‘PWA’, try this (after your plot call): for k = 1:size(PWA,1) PWA0(k) = interp1(PWA(k,:), x, 0, ...

2 days ago | 0

Filling missing values of selected columns of a table with previous values
You most likely have to use fillmissing with each variable separately: Data.English = fillmissing(Data.English,'previous'); D...

2 days ago | 0

Why does the line for my graph not appear?
The reason is that ‘b’ has only the value at the end of the loop, so a scalar. Try this: syms x f = 5./((7+x).^2); a=0; ...

2 days ago | 0

| accepted

I am trying to accomplish this same task using the find() command but I'm not sure how.
Here is a version that uses a logical vector in place of the find function: x = 0:0.1:6; y = -5*x; lv = (2 <= x) & (x <= 4);...

3 days ago | 1

| accepted

getting user input in title and legend
I would use the inputdlg (link) function. You can also use input.

3 days ago | 0

sgolayfilt function not smoothing
Try it with a 3-degree polynomial rather than a 5-degree polynomial.

3 days ago | 0

Surface Plot for ODE solution
You need to make a few changes in your code: w = 1; k=1; figure tspan = linspace(0, 5); % ...

3 days ago | 0

| accepted

Solving Integrals with Matlab
There is an error in the anonymous function in ‘A3’, and since MATLAB is case-sensitive, ‘Intfun’ is not the same as ‘intfun’. ...

3 days ago | 0

Why is my Graph not plotting properly?
Add a counter. At the beginning of your while loop: k1 = 0; theta = 0; % Rotational arm angle % while(theta <= 360) % Bei...

3 days ago | 1

A Problem with function
Save it on your MATLAB search path of user files as: normalidade.m.

3 days ago | 0

| accepted

Phase Plot - Velocity vs Position
Unless I am not understanding your code, that would appear to be: figure(2) plot(y, v) grid xlabel('Position') yleabel('Ve...

4 days ago | 0

Fsurf plot wrong when x coefficient is 0
The fsurf function cannot guess what you are thinking. Try this version of your code: syms x y z u v f1(v) = 214.906098118...

4 days ago | 0

| accepted

Frequency scale in fft after zero filling (odd/even number of data)
I am not certain what you are doing. One way to make the frequencies equal would be to use the second argument, ‘n’, in the ff...

4 days ago | 1

| accepted

How do I extrapolate a point from a generated graph.
The easiest way is to use the interp1 (link) function to get the time when the car has travelled 250m.

4 days ago | 0

| accepted

How to use a subplot in a for loop
I am not certain what you want. Try this: syms y x y = acos(x); n = [3 5 7] ttlc = {'y', 'T3(x)', 'T5(x)', 'T7(x)'}; ho...

4 days ago | 0

How do I get some part of my boxplot labels italic? I can not change the Interpreter to 'tex' somehow? Why? How can I work around?

4 days ago | 0

| accepted

MATLAB system of ODEs

5 days ago | 1

| accepted

i am trying to put my level curves and gradient vectors on same figure but i can't
Your current approach is not going to work. Try this instead: f=@(x,y) 16*y.^2 + 9*x.^2; g = @(z) gradient(z) figure(1) ...

5 days ago | 1

| accepted