Community Profile

photo

Star Strider


12.751 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.

Contact

Star Strider's Badges

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

View details...

Contributions in
View by

Answered
How to rearrange the output variables for matlabFunction()?
I can’t run the code you posted, since it generates significant errors about matrix size multiplication. However, a simple ex...

alrededor de 12 horas ago | 1

| accepted

Answered
solve an equation using solve() produces an array instead of a unique value
The result is correct. There are three roots. Plot it to see the result: syms h d = 32*h + 200*(32*h - 8)*((4*h - 1)^2 -...

alrededor de 13 horas ago | 0

| accepted

Answered
Error while solving a coupled system of ODE
Your ‘DM_bacteria’ function must return a column vector output. This worked when I ran it just now: function [dxdt] = DM_ba...

alrededor de 14 horas ago | 1

Answered
Array indices must be positive integers or logical values
The problem: for k=0:M-1 The solution: for k=1:M In MATLAB, subscript indices begin at 1, not 0, and are defined as intege...

alrededor de 15 horas ago | 0

| accepted

Answered
Wrong answer for sine function
Define ‘t’ in terms of days (or fractions of days). Try this: rforce = @(t) 0.3 + 0.2.*sin(2.*pi.*t/365 - pi/2); tdays =...

alrededor de 15 horas ago | 1

| accepted

Answered
Working With Matlab Tables
I created my own table to test my code. (I didn’t post it previously because the other two Answers had already appeared.) Th...

alrededor de 16 horas ago | 0

Answered
Ploting two different vectors in the same figure
Use element-wise multiplication, then transpose ‘a’ and ‘b’ to use the references in your plot3 calls. Alos, specifically use t...

alrededor de 16 horas ago | 0

| accepted

Answered
Understanding Figure Windows & Changing Their Apperances
According to the documentation on Figure Properties, Number is read-only. However, this appears to work: Stress = figure(34...

alrededor de 19 horas ago | 0

Answered
plot with a few sample marked.
Try these: x= 1:0.01:40; y = cos(x); L1 = y <= 0.5; % Logical Index: y <= 0.5 figure pl...

alrededor de 19 horas ago | 0

Answered
how can i save struct in file txt?
Use the save function to save it as a .mat file.

alrededor de 19 horas ago | 1

| accepted

Answered
Circle centers plot aren't in the same place as the circles in a figure
I cannot run your code. However, since ‘centersStrong’ is a two-column matrix of the x and y coordinates, your plot call woul...

alrededor de 22 horas ago | 0

| accepted

Answered
The question about DC component!
Removing the DC component is useful in showing the other peaks in the Fourier transform of your signal, if there is a very high ...

1 día ago | 0

| accepted

Answered
fprintf conversion character use \c or \s?
Putting character arrays and numeric variable types together in a matrix is not appropriate. Try this instead: countries = ...

1 día ago | 0

Answered
Error when solving an equation involving a poisson pdf
Try this (instead of using the Symbolic Math Toolbox): lambda = fzero(@(lambda) poisspdf(10, lambda) - 0.1, 5) producing: l...

1 día ago | 0

| accepted

Answered
Ploting solutions to linear equations
The ‘A*Y’ operation attempts to multiply (3x3) matrix ‘A’ by a (2x1) vector ‘Y’. That will just never work! The ‘Y’ vector m...

1 día ago | 0

Answered
multiplay without * using for loop
log

1 día ago | 0

| accepted

Answered
How to retrieve last 3 digits from each entry of a matrix of order 3 x 4 ?
Another approach: A = [35679, 35678, 35677, 35676; 35675, 35674, 35673, 35672; 35671, 35670, 35669, 35668]; Out = 1000*rem(A/...

2 días ago | 0

Answered
Mean of 72720 rows in one column such that I can take mean of 720 rows separately.
Try this: data = (1:72720)'; % Create Column Vector To Test Code rdata = reshape(data, [], 7...

2 días ago | 1

| accepted

Answered
insert rows and columns in a matrix
One approach: M = rand(3); Mz = zeros(size(M,1)+1, size(M,2)+1); Mz(1:size(M,1), 1:size(M,2)) = M; producing (here): Mz =...

2 días ago | 1

| accepted

Answered
Creating String Array Between Two Dates
Try this: date = '01-jan-2019'; EndDate = '03-feb-2019'; DateVec = datetime(date); EndDateVec = datetime(EndDate); DayArr ...

2 días ago | 0

Answered
Function for ODE45 solver doesn't work
You have not provided enough information to determine what the problem is. However, considering that ‘Istim_sys’ may be a vecto...

2 días ago | 0

Answered
Function doesn't return a vector from a vector input
‘Could someone tell me my mistake?’ You need to use the any or all functions in the if statements, depending on what you want...

3 días ago | 1

| accepted

Answered
Bode Plot - trasnfer function
Try this (your code slightly edited): s = tf('s'); G = ((1+s*1E-3))/((s*1E-2)*(1+s*1E-1)*(1+s*1E-5)); bode(G) ...

3 días ago | 1

| accepted

Answered
Failure in initial objective function evaluation. FSOLVE cannot continue.
The ‘Y’ evaluation is missing a few multiplication(?) operators, and needs to do element-wise operations elsewhere: Y = B-((Q1...

3 días ago | 0

Answered
Question on how to use scatter3
The ‘Z’ vector can be anything, providing it is a vector of the same size as the others. Setting it equal to: Z = zeros(size(...

3 días ago | 0

| accepted

Answered
How do I plot these for loops?
Put them all in subplots, with the appropriate indexing: tspan = linspace(0, 5, 25); for k=1:5 y0 = 0; [t,y(:,k)] = ode45(@...

3 días ago | 0

| accepted

Answered
Other alternative than syms for differentiation and integration?
MATLAB is case-sensitive, so X ~= x. Try this: syms x; fun = x^3+2*x+10; dfundx = diff (fun,x); producing: dfundx = 3...

3 días ago | 0

Answered
Solving non linear equations sytem
The Symbolic Math Toolbox is not optimal for such problems. It is likely not worth the effort to see if a symbolic solution exi...

4 días ago | 2

Answered
undefined variable error when the variable is there
Please note that: l ~= 1 You typed: for i = l:length(t) for j = l:length(x) however I believe you intended: for i =...

4 días ago | 0

| accepted

Answered
t(j) is coming up as an error when trying to graph values. what am i doing wrong
It doesn’t appear that you have defined ‘j’ anywhere before the loop. One possibility: iv = 0:0.1:t1; for j = 1:numel(iv) ...

5 días ago | 0

| accepted

Load more