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.

Statistics

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

View badges

Content Feed

Answered
How to convert day information to a number?
Experiment with something like this — daynr = @(x) find(strcmp(x, {'Mon','Tue','Wed','Thu','Fri','Sat','sun'})); nr = day...

etwa 12 Stunden ago | 0

| accepted

Answered
Reading data of nonstandard format
I use textscan for these problems. Try this — fidi = fopen('reconstructed[1].txt','rt') k1 = 1; while ~feof(fidi) HL...

etwa 17 Stunden ago | 0

| accepted

Answered
How to draw a line between two points on a graph?
I recognise that code! I added this plot call to the others in the loop: plot([minx maxx], [0 0], '-k', 'LineWidth',1) ...

etwa 18 Stunden ago | 0

| accepted

Answered
Restore old editor in R2021b?
Set the fonts by clicking on Preferences in the ENVIRONMENT section of the MATLAB toolbar (at the top of the window in the HOME ...

etwa 19 Stunden ago | 0

Answered
Help Plotting Diffusion Equation in MatLab
One option is to stack them in the same axes — x = linspace(-200, 200); v = logspace(-2, 2, 10); y = exp(-(x./v(:)).^2); ...

ein Tag ago | 0

Answered
Impossible to do an indexing
I suspect the problem is with: soleus(stim_Hz) Here, ‘stim_Hz’ must be either logical, or integers greater than 0. There are...

ein Tag ago | 0

Answered
Converting syms to double
I have no idea what you are actually doing, however converting between symbolic and double is straightforward (if inefficient in...

ein Tag ago | 0

Answered
how to assign indexes to a function handle?
‘But I want to use a vector "f" insted of a single number to have a vector of "TL" values.’ I cannot run that because there a...

ein Tag ago | 1

| accepted

Answered
smoothdata function not working for matrix . any one have ideas to what is going on?
Try this — LD = load('mat.mat'); a = LD.a; for k = 1:size(a,2) a_smoothed(:,k) = smoothdata(a(:,k)); end x = 1:si...

2 Tage ago | 0

Answered
problem with fit function for data
The fit function requires column vector arguments. Force that sith the ‘(:)’ subscript noitation. E = [416.861, 818.7, 109...

2 Tage ago | 1

| accepted

Answered
How to use one marker for looped plots in legend
I cannot run the posted code, however the solution may be straightforward. figure hold on for k = 1:50 hs{1} = scatter...

2 Tage ago | 0

Answered
fit 2nd order differential equation parameters to data
The problem appears to be not allowing the intial conditions to be estimated as parameters as well as the initial value of ‘a_m’...

2 Tage ago | 0

| accepted

Answered
Using solve to find intersection points
It’s as simple as it looks — syms x f(x) = exp(-x^2) g(x) = sym(0.8) xi = solve(f == g) xi_vpa = vpa(xi) .

3 Tage ago | 0

| accepted

Answered
How can I simplify the folllowing equation
One approach — syms x Eqn = 2*x^2 - 2*x*(2*x^2 - 1) + 2*x*(2*x*(2*x^2 - 1) - 2*x^2 + 1) - 1 Eqn = simplify(Eqn, 500) .

3 Tage ago | 0

| accepted

Answered
How to plot data with two different X- axis in a single plot?
One option is to use the subplot function in a loop — Z = readtable('https://www.mathworks.com/matlabcentral/answers/uploade...

4 Tage ago | 0

| accepted

Answered
translating and solving an equation with values of x and y known
In the third term, the square root is of the numerator only, not the entire expression, amd the denominator does not appear to h...

4 Tage ago | 0

Answered
To determine whether the system is stable.
Welcome to the wonderful world of floating-point approximation error! See ‘Check’ and ‘Check_max’ for an illustration of the ...

4 Tage ago | 1

| accepted

Answered
How to properly format a data table with fprintf?
In the numeric edit descriptors, the value to the left of the decimal is the field width (this includes all the numbers, the sig...

4 Tage ago | 0

Answered
Find which matrix row contains average minimum value
One approach — M = rand(288,365); AMV = mean(min(M)) % Average Minimum Value [val,idx] ...

4 Tage ago | 0

| accepted

Answered
trying to find theta
The Question lacks clarity. % plot mountain Mn_x = [0, 1000, 3014.8]; Mn_y = [0, 0, 616]; plot (Mn_x, Mn_y) hol...

4 Tage ago | 0

| accepted

Answered
Solve for x given y and plot
Depending on what you wan, either use fzero or interp1 — y = @(x) (2 * exp((2*x)/3)) - ((7*x.*exp((2*x)/3))/3); x = linspace(...

4 Tage ago | 0

| accepted

Answered
Doubt in solving ODE45
It seems that ‘dis’ does not appear anywhere. L=20; v=20;%v (m/sec) T=L/v; tspan_1=[0:0.001:T];%time range y0_1=[0;0];...

5 Tage ago | 0

Answered
How do you plot a line of constant value on a surface plot?
See if contour3 or contour3m will do what you want. [X,Y,Z] = peaks(30); figure surf(X,Y,Z) hold on contour3(X,Y,Z,[1 1...

5 Tage ago | 0

Answered
How to properly create function for integration?
There are several problems with the posted code image. First, ‘z’ is not defined anywhere, and it is not an argument to ‘E_fu...

5 Tage ago | 0

Answered
How can I plot the derivatives of the components of the solution to a system of ODEs?
The only way is to use al loop — tspan = [0 50]; z0=[0.01 0.01 0.01 0.01]; [t,z] = ode45(@(t,z) coupled(t,z), tspan, z0); ...

5 Tage ago | 2

| accepted

Answered
Cannot calculate integral function
If you want a numeric result, use vpaintegral (introduced in R2016b) instead of int. Not all expressions have analytic integral...

5 Tage ago | 0

| accepted

Answered
How to convert logarithmic to linear
If you have the Signal Processing Toolbox, use the db2mag function. If you do not have it: dB2mag = @(dB) 10.^(dB/20); ...

5 Tage ago | 0

Answered
Matlab Polar Plot Legend does not match with the plot
I cannot run that and I amm not certain what you are are plotting. Create a handle for each polarplot call: th = linspace(0, ...

5 Tage ago | 0

Answered
How to save output of double loop as a matrix?
Since ‘A’ is a matrix, save it as a cell array — for i=1:m for j=1:n A{i,j} = myfunction(...) end end .

6 Tage ago | 1

| accepted

Answered
Shaded Standard Deviation Corridors
There are NaN values in ‘x’, ‘y’, and ‘sd’. This ia frequent cause of patch failures. Remove them and it works! Try this ...

6 Tage ago | 1

| accepted

Load more