Answered
How to add a white Noise with rms amplitude of 0.5 v by matlab?
The *|randn|* function returns normally-distributed random numbers with a mean of *|0|* and a standard deviation of *|1|*. The ...

9 years ago | 1

| accepted

Answered
can this plotted circle be filled? it needs to have a solid color
Use *|fill|*: xCenter = 0; yCenter = 0; thetaValue = 0:360; radiusJoint = 1; jointZerox = radiusJoint*cosd...

9 years ago | 0

Answered
Why the vector vo has those NaN characters? How can i fix it?
*_‘... why is that?’_* This part of the expression: exp(40*(vi-vo))-1) becomes vanishingly small.

9 years ago | 0

Answered
Can u find the error in this code
Vectorize: I=((sin(N*alpha))./(N*sin(alpha))).^2; ↑ ↑ HERE ...

9 years ago | 0

| accepted

Answered
Scatter multiple Vectors on same graph
*_‘i can scatter plot the 3 vectors on the same graph ?’_* Yes. I would do something like this: figure(1) scatter3(...

9 years ago | 0

| accepted

Answered
I need to find the zero crossing point(positive) for only P wave,how do isolate that point from rest of the other points.
The EKG in ‘ecg signal.PNG’ has a wandering (inconstant) baseline. In a healthy EKG (as is this one), P-waves should not have a...

9 years ago | 0

Answered
warning about optimset and using optimoptions
Your best option is in the error message: set option Algorithm to 'trust-region' using optimset.

9 years ago | 0

| accepted

Answered
Looking for a solution to simulate a frequency beating through two wavelength components
The combination of two frequencies to simulate a ‘beat’ is not specific to photonics. In continuous-time terms, it is simply a ...

9 years ago | 0

Answered
sum calculation in matlab
Note that *|‘32T3’|* is not a valid MATLAB variable name (they cannot begin with numbers). I changed it to *|‘S2T3’|*, and used...

9 years ago | 0

Answered
Damped Sinusoid Plot Inspection
How would you find the peaks in your function? How would you use the same Signal Processing Toolbox function on your transf...

9 years ago | 0

Answered
How to display result in matlab without this format 1.0253e+04?
Consult the documentation on the <https://www.mathworks.com/help/matlab/ref/format.html *|format|*> (link) function.

9 years ago | 0

Answered
Estimating two coefficients out of three in quadratic function
Try this: x= [ 0, 5 ,9, 10,15, 16]; y= [715,901, 1139, 1224,1553,1712]; F = [x(:).^2 x(:)]\y(:); eqnstr =...

9 years ago | 0

| accepted

Answered
How to elongate the linarfit to intercept the y-axis
*_‘...without having to change the interval of the x-axis’_* Not possible. You *_must_* elongate the *|x|*-axis to include...

9 years ago | 0

Answered
printing columns next to each other
You need to concatenate the variables into a matrix, then transpose the matrix: fprintf(fileid, '%6.4f %12.4f %14f %16f\n'...

9 years ago | 2

| accepted

Answered
How to find a symbolic derivative?
See if the <https://www.mathworks.com/help/symbolic/functionalderivative.html *|functionalDerivative|*> (link) function does wha...

9 years ago | 0

Answered
Matlab functions/scripts
Without seeing them, no. If you are using *|global|* variables, remove the *|global|* calls and pass those variables as arg...

9 years ago | 0

| accepted

Answered
How can I fix the rltool and bode functions "too many input arguments" error?
Your code runs for me without error. You probably have a variable named *|‘bode’|* in your workspace. Run this from your C...

9 years ago | 0

Answered
Find intersection point given a line segment
Since it appears to be a linear regression, defined as: y = slope * x + y_intercept; the *|x|*-axis intercept (where *|...

9 years ago | 0

| accepted

Answered
Index exceeds matrix dimensions. But I barely did anything yet.
You probably have a variable named *|‘tf’|* somewhere in your workspace. To find out, run this from your Command Window or ...

9 years ago | 1

| accepted

Answered
how to form a 3D surface with several points whose coordinate in x,y,z axis is known
One approach (using *|griddata|* interpolation): X = [0 5 0 5 2.5 0.417 2.5 4.58 0.417 2.5 4.58 2.5]; Y = [0 0 5 5 0.15...

9 years ago | 0

Answered
how to draw piecewise functions
This will get you started: g = @(t) [(-4-2*t).*((t > -2) & (t < 0)) + (-4+3*t).*((t > 0) & (t < 4)) + (16-2*t).*((t > 4) &...

9 years ago | 1

| accepted

Answered
Error on solving differential equation using dsolve
There is probably not an analytic solution to your system. The best way to proceed is to use *|matlabFunction|* to create a...

9 years ago | 0

Answered
Running a script in a repeated time interval
Experiment with the <https://www.mathworks.com/help/matlab/ref/timer-class.html *Timer Class*> (link) objects. They are the onl...

9 years ago | 0

| accepted

Answered
How do I get a surface graph of my function f(x,y)?
Use an anonymous function, and don’t use the Symbolic Math Toolbox. You don’t need it for this problem. f = @(x,y) sin(x...

9 years ago | 0

| accepted

Answered
More than one matlab version
*_- Is it normal that the old version is still on my pc?_* Yes, unless you uninstall the previous version. *_- Is there ...

9 years ago | 0

Answered
Connecting Points with the coordinate of origin
Try this: phi=0:1/18*pi:2*pi; rho=1000; [x y]=pol2cart(phi,rho); fcn = @(b,x,y) (x-b(1)).^2 + (y-b(2)).^...

9 years ago | 0

Answered
getting the area under the peaks
I would first identify the low points (‘valleys’) by inverting your signal and then using the Signal Processing Toolbox *|findpe...

9 years ago | 1

| accepted

Answered
How can I plot a step response to an
You can increase the amplitude of the *|step|* by using *|stepDataOptions|*: opt = stepDataOptions; opt.StepAmplitude =...

9 years ago | 0

Answered
(R2016.a) Undefined function or variable 'gaoptimset'.
You could have a path problem. Run these lines from the Command Window or a script: restoredefaultpath rehash too...

9 years ago | 0

Answered
I'm trying to sort one vector based on another vector of seemingly the same size, but i keep getting the index exceeds matrix dimensions error. What's the issue?
One approach: gene='AbcDaBCd'; caps = regexp(gene, '[A-Z]'); v = sort(gene(caps)); I can find no reference to the...

9 years ago | 0

Load more