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

Answered

Storing data for "for loop"

Try something like this: L0 = [1 2 3 4 5]; L10 = [2 3 4 5 6]; L20 = [0 9 2 3 4]; L = [L0; L10; L20]; x = 0:4; n = size(...

Storing data for "for loop"

Try something like this: L0 = [1 2 3 4 5]; L10 = [2 3 4 5 6]; L20 = [0 9 2 3 4]; L = [L0; L10; L20]; x = 0:4; n = size(...

circa 9 ore ago | 1

| accepted

Answered

how to plot symbolic equation

That requires a bit of name-value pair arguments to the fcontour function. Try this: syms f(x,y) x y f(x,y) = x^2 + (3*y...

how to plot symbolic equation

That requires a bit of name-value pair arguments to the fcontour function. Try this: syms f(x,y) x y f(x,y) = x^2 + (3*y...

circa 10 ore ago | 0

| accepted

Answered

Cant run this script, trying to plot a graph, please help

My pleasure. When I did: D1 = load('PC3_DMSO_0.5uM_4c.mat') I got: D1 = struct with fields: PC3_TOFA_5uM_8:...

Cant run this script, trying to plot a graph, please help

My pleasure. When I did: D1 = load('PC3_DMSO_0.5uM_4c.mat') I got: D1 = struct with fields: PC3_TOFA_5uM_8:...

circa 15 ore ago | 0

Answered

Simplifiy function incorrect result?

You just need to tell simplify to keep simplifying: DetJa = simplify(detJa, 'Steps',500) producing: DetJa = l3*l4*sin(q3)...

Simplifiy function incorrect result?

You just need to tell simplify to keep simplifying: DetJa = simplify(detJa, 'Steps',500) producing: DetJa = l3*l4*sin(q3)...

circa 16 ore ago | 0

Answered

For with a 0.1 step

Indices must be integers greater than 0, or logicals. Try this: i=1:0.1:10; for k = 1:numel(i) theta=0; betha=1/...

For with a 0.1 step

Indices must be integers greater than 0, or logicals. Try this: i=1:0.1:10; for k = 1:numel(i) theta=0; betha=1/...

circa 18 ore ago | 0

| accepted

Answered

Tangents to the curves

At what point do you want to plot the tangent? The usual approach is to use the gradient function to find the slope, then use...

Tangents to the curves

At what point do you want to plot the tangent? The usual approach is to use the gradient function to find the slope, then use...

circa 20 ore ago | 0

| accepted

Answered

How to connect the multi scatter?

I am not certain what reault you want. Try this: p=1:10; pone=randi(10,1,numel(p)); ptwo=randi(10,1,numel(p)); plot(p,po...

How to connect the multi scatter?

I am not certain what reault you want. Try this: p=1:10; pone=randi(10,1,numel(p)); ptwo=randi(10,1,numel(p)); plot(p,po...

circa 22 ore ago | 0

| accepted

Answered

Jarque-Bera test!

Guessing here, since we don’t know what ‘x’ is. It appears that ‘x’ may be complex. If so, your best approach is likely to u...

Jarque-Bera test!

Guessing here, since we don’t know what ‘x’ is. It appears that ‘x’ may be complex. If so, your best approach is likely to u...

circa 23 ore ago | 0

Answered

Undefined operator '-' for input arguments of type 'table'.

One option is to use the table2array (link) function to extract your table data to an array kstest can use.

Undefined operator '-' for input arguments of type 'table'.

One option is to use the table2array (link) function to extract your table data to an array kstest can use.

circa 23 ore ago | 0

Answered

polyfit equation in scatter in matlab

Try this: text(min(xlim)+0.1*max(xlim), max(ylim)-0.1*max(ylim), sprintf('y = %.3f*x + %.3f', p)) % Top Left Corner Exper...

polyfit equation in scatter in matlab

Try this: text(min(xlim)+0.1*max(xlim), max(ylim)-0.1*max(ylim), sprintf('y = %.3f*x + %.3f', p)) % Top Left Corner Exper...

circa 23 ore ago | 0

Answered

Matlab as LaTeX interpreter?

To a limited extent at least, yes. See the text (link) documentation section on Interpreter (link).

Matlab as LaTeX interpreter?

To a limited extent at least, yes. See the text (link) documentation section on Interpreter (link).

1 giorno ago | 0

Answered

How to fix error using fread

Be sure you are using 'ubit1' and not 'ubitl'. It is not at all uncommon for people to use the lower-case ‘l’ instead of the ...

How to fix error using fread

Be sure you are using 'ubit1' and not 'ubitl'. It is not at all uncommon for people to use the lower-case ‘l’ instead of the ...

1 giorno ago | 0

| accepted

Answered

How to find a double integral

It is best to vectorize your function using element-wise operations, then create it as a function of the two variables, then use...

How to find a double integral

It is best to vectorize your function using element-wise operations, then create it as a function of the two variables, then use...

2 giorni ago | 0

Answered

Creating a piecewise sine function having different frequency components

Try this: Fs = 1000; t = linspace(0, 1, 1E+3)/Fs; % Time Vector (1 sec) f = 100:100:3...

Creating a piecewise sine function having different frequency components

Try this: Fs = 1000; t = linspace(0, 1, 1E+3)/Fs; % Time Vector (1 sec) f = 100:100:3...

2 giorni ago | 0

Answered

interp2 changes the value of pixels also

‘In my image the value of pixels are only 0, 1 , 2 , 3 but when I read the image I get after interp2 some values such as 2.67 ap...

interp2 changes the value of pixels also

‘In my image the value of pixels are only 0, 1 , 2 , 3 but when I read the image I get after interp2 some values such as 2.67 ap...

2 giorni ago | 1

Answered

solving nonlinear equation by fsolve

You need to return ‘SI_sol’ from ‘singhandyu’, so declare it as: function [SI_sol] =singhandyu(P,Q,P5,lambda,Ts,fc) Also, 0 i...

solving nonlinear equation by fsolve

You need to return ‘SI_sol’ from ‘singhandyu’, so declare it as: function [SI_sol] =singhandyu(P,Q,P5,lambda,Ts,fc) Also, 0 i...

2 giorni ago | 0

Answered

Substitute multiple values to array of expressions

The ‘x’ values are not ‘x1’, ‘x2’, ..., but ‘x(1)’, ‘x(2)’, ... Try this instead: q = subs(xs(1),{x(1),x(2),x(3),x(4)},{[0,...

Substitute multiple values to array of expressions

The ‘x’ values are not ‘x1’, ‘x2’, ..., but ‘x(1)’, ‘x(2)’, ... Try this instead: q = subs(xs(1),{x(1),x(2),x(3),x(4)},{[0,...

2 giorni ago | 0

| accepted

Answered

Ode45 problem with equations

If your ‘f1’ function executes, then at least it is working. I get the impression that it is ‘stiff’, particularly because of...

Ode45 problem with equations

If your ‘f1’ function executes, then at least it is working. I get the impression that it is ‘stiff’, particularly because of...

2 giorni ago | 0

Answered

how to display final partial fraction

I am not certain what result you want. Use the poly (link) function to get polynomials from ‘R’, ‘P’ and ‘K’: nx=[1 -2 -5 6...

how to display final partial fraction

I am not certain what result you want. Use the poly (link) function to get polynomials from ‘R’, ‘P’ and ‘K’: nx=[1 -2 -5 6...

2 giorni ago | 0

Answered

I want to know how to plot the intersection of a 3D picture with a plane.

I am not certain what you want. Try these: x=-10:0.1:10; y=x; [x,y]=meshgrid(x,y); z=1-5*x.^2+3*y.^2+7*x.*y+4*x-9*y; ...

I want to know how to plot the intersection of a 3D picture with a plane.

I am not certain what you want. Try these: x=-10:0.1:10; y=x; [x,y]=meshgrid(x,y); z=1-5*x.^2+3*y.^2+7*x.*y+4*x-9*y; ...

2 giorni ago | 1

| accepted

Answered

Why am I not getting the plot results?

Yopu need to use element-wise operations in these assignments: rpr1 = (cos(theta)/enpr - sqrt((e1-enpr^2*sin(theta).^2)/e1)) ...

Why am I not getting the plot results?

Yopu need to use element-wise operations in these assignments: rpr1 = (cos(theta)/enpr - sqrt((e1-enpr^2*sin(theta).^2)/e1)) ...

2 giorni ago | 0

Answered

setting tolerance in lsqcurvefit

Bad fits with the nonlinear parameter estimation routines are most likely the result of either the model not correctly describin...

setting tolerance in lsqcurvefit

Bad fits with the nonlinear parameter estimation routines are most likely the result of either the model not correctly describin...

2 giorni ago | 0

| accepted

Answered

Mean of Matrix Rows

The row means would be calculated as the mean of dimension 2. Try this: A = rand(5); Anew = A - mean(A,2); Check = mean(A...

Mean of Matrix Rows

The row means would be calculated as the mean of dimension 2. Try this: A = rand(5); Anew = A - mean(A,2); Check = mean(A...

3 giorni ago | 0

Answered

difference between commands of CTFT and DTFT

If I understand your Question correctly, the Symbolic Math Toolbox fourier function computes the analytic Fourier transform of a...

difference between commands of CTFT and DTFT

If I understand your Question correctly, the Symbolic Math Toolbox fourier function computes the analytic Fourier transform of a...

3 giorni ago | 0

| accepted

Answered

How do I change the parameters and then evaluate the function again

First, you do not need the ’Pfunction’ function, since it simply returns ‘f’ as a function. Just use ’f’ directly. After tha...

How do I change the parameters and then evaluate the function again

First, you do not need the ’Pfunction’ function, since it simply returns ‘f’ as a function. Just use ’f’ directly. After tha...

3 giorni ago | 0

Answered

Patch Multiple Specified Colors

The simplest way is probably to define a colormap for the figure. Try this: X = [0 0; 0 0; 4 4]; Y = [0 4; 3 7; 0 4]; C =...

Patch Multiple Specified Colors

The simplest way is probably to define a colormap for the figure. Try this: X = [0 0; 0 0; 4 4]; Y = [0 4; 3 7; 0 4]; C =...

3 giorni ago | 0

| accepted

Answered

multiplying cell array with a matrix

You may want to do element-wise (array) multiplication rather than matrix multiplication. Try this: @(x)x.*matrix Note the...

multiplying cell array with a matrix

You may want to do element-wise (array) multiplication rather than matrix multiplication. Try this: @(x)x.*matrix Note the...

3 giorni ago | 0

Answered

Matlab documentation in printed format

Downloading and printing the PDF Documentation (link) is likely the best you can hope for.

Matlab documentation in printed format

Downloading and printing the PDF Documentation (link) is likely the best you can hope for.

3 giorni ago | 1

Answered

plot3 error bars

The errorbar function is only defined for 2D plots. Here’s one approach to plotting errorbars with plot3: x = rand(10,1); ...

plot3 error bars

The errorbar function is only defined for 2D plots. Here’s one approach to plotting errorbars with plot3: x = rand(10,1); ...

3 giorni ago | 0

| accepted

Answered

what is the solution of this error?

This assignment: t(1,:) = 20; creates a (1x1) value for ‘t’, so in this assignment: t(j+1) = 60*t(j,2)-59*t(j,1)+300; ‘t(j...

what is the solution of this error?

This assignment: t(1,:) = 20; creates a (1x1) value for ‘t’, so in this assignment: t(j+1) = 60*t(j,2)-59*t(j,1)+300; ‘t(j...

3 giorni ago | 0