Answered
Imag, real function error
My *_guess_* is that you used *|‘imag’|* and *|‘real’|* as _variables_ somewhere earlier in your code. The solution is to find ...

9 years ago | 0

Answered
How can I plot a polar plot with varying colour
Please see my Answer to your previous Question: <https://www.mathworks.com/matlabcentral/answers/356232-how-can-i-plot-3d-polar-...

9 years ago | 0

Answered
How can I plot 3D polar plot in MATLAB
There may be File Exchange contributions for 3D polar plots. It is possible to use the *|sph2cart|* function to plot your data ...

9 years ago | 0

| accepted

Answered
Why 'lsqcurvefit' doesn't work well?
<http://www.mathworks.com/matlabcentral/answers/121579-curve-fitting-to-a-sinusoidal-function *Curve fitting to a sinusoidal fun...

9 years ago | 0

Answered
A simple "bug" in finding an element in an array using find()?
Welcome to floating-point approximation error, and the way the colon operator works. Try this: list=-1:0.1:1; find...

9 years ago | 0

| accepted

Answered
Processing GPS data to velocity
The *|pdist2|* function is overkill for what you want to do. I don’t know what format your latitude and longitude arrays are (I...

9 years ago | 0

| accepted

Answered
How can I read formula data?
Try this: value1 = '10*x+4*x+2'; velocity_fcn = str2func(['@(x) ' value1]); x = 42; velocity = velocity_fcn(x)

9 years ago | 0

Answered
[Z transform] problem with MATLAB
The Symbolic Math Toolbox doesn’t know you’re trying to convert it from the Laplace domain to the *|‘z’|* domain. You have to p...

9 years ago | 3

| accepted

Answered
How can we fit hyperbola to data?
Try this: D = xlsread('data for hyperbola fitting.csv'); D = sortrows(D,1); x = D(:,1); y = D(:,2); hyprb ...

9 years ago | 6

| accepted

Answered
error in ode solver for heaviside function
Numeric ODE solvers do not handle discontinuities well, so it is necessary to integrate it for each side of the discontinuities,...

9 years ago | 0

| accepted

Answered
How do I plot a function with a variable that has multiple values?
You can create a matrix using a vector for *|‘T0’|* and the exponential function in *|‘t’|* using vector multiplication, then pl...

9 years ago | 0

Answered
how to filter a signal
I showed you how to _correctly_ design a filter <https://www.mathworks.com/matlabcentral/answers/355037-i-have-a-signal-with-man...

9 years ago | 0

| accepted

Answered
how to get the frequency from Pole-zero map?
The resonant frequencies (poles) are given by the absolute value of the poles of the _continuous_ system. *_Example_ —* ...

9 years ago | 0

Answered
Remove peaks below a threshold using findpeaks function
This tweak to your code should work: X_peakVal = X(Peaks < 0.01*max(Peaks)) ; %Find X value of the peaks If that worked...

9 years ago | 2

Answered
Integration producd NaN as answer
First, *|‘t’|* needs to be defined as a *|sym|* object; Second, use the convenient *|heaviside|* function to define the unit...

9 years ago | 0

Answered
Count the number of the same rows in array
Try this: A=[ 44444; 66666; 44444; 88888; 44444; 66666]; [Au,~,ic] = unique(A, 'stable'); tally = accumarray(ic,...

9 years ago | 1

Answered
How to output derivative from ODE 45
Taking the numerical derivatives using the *|gradient|* function is the easiest solution. For best results, this requires that ...

9 years ago | 1

Answered
Check for identical maximum values in an array
Probably the easiest way is to do logical indexing and count the number of non-zero elements to get the number of maximum values...

9 years ago | 2

Answered
How to remove a baseline without using sgolayfilt
It depends on what you intend by ‘baseline’ (that you did not define). The *|detrend|* function _could_ be what you want. ...

9 years ago | 0

Answered
Change marker width in bode plot
The *|bode|* function doesn’t accept many options with respect to its plots. The easiest way to do what you want is to request ...

9 years ago | 1

| accepted

Answered
Combine 2 shaded boundaries
A few tweaks and it works: data=load('Jun15_VelocityUV.txt'); b= data(:,1); y=b(104:127,:); % Input x-axis ...

9 years ago | 0

| accepted

Answered
How to Create a 5x5 matrix whose rows are (1:5)?
You can do that with simple vector multiplication: A = ones(5, 1) * (1:5);

9 years ago | 1

| accepted

Answered
how do i extract every 10th column from a matrix
I can’t find a ‘selectcolumn’ function in the online documentation or the File Exchange. If *|‘M’|* is your matrix, either:...

9 years ago | 0

Answered
finding dominant frequency and frequency range of a stored signal.
See the documentation on the <https://www.mathworks.com/help/releases/R2015a/matlab/ref/fft.html *|fft|*> (link) function. ...

9 years ago | 0

Answered
fill comand in functions
Try this: x = linspace(0, 6, 500); upper_curve = sqrt(x); lower_curve = x.^2 - 3; idx = (upper_curve >= lower...

9 years ago | 0

Answered
regarding to the reshape and quiver command
Try this: c = textscan(fileid, '%f%f%f%f', 'HeaderLines',3, 'CollectOutput',1, 'Delimiter',','); c_new = reshape([c{:}]...

9 years ago | 0

Answered
Determine a Fourier-sum expression for the steady-state current
Explore the relation of the Laplace transform (that you already have) and the Fourier transform. Remember that the Fourier ...

9 years ago | 0

Answered
Calculate partial area under curve using a plot equation for a certain range of x and range of y?
It is not necessary to define a function to fit your data. See <https://www.mathworks.com/matlabcentral/answers/355017-how-to-i...

9 years ago | 1

Answered
fill comand (functions)
Try this: x = linspace(-5, 5); % Define Indepenent Variable upgoing_curve = x.^2...

9 years ago | 0

| accepted

Answered
i have a signal with many frequencies. how to remove a particular frequency and reconstruct the signal.
Try this filter: signal = load('datee.txt'); % Signal Vector signal = detrend(signal,0); ...

9 years ago | 2

Load more