Answered
Animation in Matlab using animatedline command
The *|clearpoints|* calls cause the blinking. I am not certain what you want to do. However it might be better to re-desig...

9 years ago | 0

Answered
hi i need writing a code that ceil random number without preset func like ceil,fix,
If you are allowed to use the *|rem|* or *|mod|* functions, this works: v = 100*rand(1,10); Out = v - rem(v,1); Out ...

9 years ago | 0

| accepted

Answered
how to sum a vector without sum func
The elements are cubed, so the signs are conserved. This works: v = [19^3 -17^3 +15^3 -13^3 +11^3 -9^3 +7^3 -5^3 +3^3...

9 years ago | 0

| accepted

Answered
how to store the values obtained in a for loop?
It is difficult to determine what you are doing. The *|fsolve|* function will optimise the *|‘a’|* and *|‘b’|* parameters. I w...

9 years ago | 0

Answered
Finding inv(A) for Ax=b system
Use the <https://www.mathworks.com/help/matlab/ref/lsqr.html *|lsqr|*> (link) or similar function to solve sparse matrix problem...

9 years ago | 0

Answered
Implementing Unilateral Z-Transform of a^n
It is necessary to add assumptions, then a *|simplify|* call: syms a n z assume(a > 0) assumeAlso(a < 1) assumeA...

9 years ago | 1

| accepted

Answered
solve three non linear power equations
Try this (requires the Symbolic Math Toolbox): syms x y z assume(x > 0) M = [x*10^y+z==5; x*25^y+z==4.95; x*30^y+...

9 years ago | 0

Answered
How to remove regression line from qqplot?
Return a handle from your *|qqplot|* call, then find the line you want to remove, (experiment) and set its color to *|'none'|*. ...

9 years ago | 1

| accepted

Answered
Two line simple animation
You need to define *|animatedline|* for _each_ line. See if this does what you want: h1=animatedline; h2=animatedl...

9 years ago | 0

Answered
Inverse Z-Transform of z/(z-a) - Strange result
Specify *|‘a>0’|*, and simplify: syms a n z assume(a > 0) iz=iztrans(z/(z-a),z,n); iz = simplify(iz); iz =...

9 years ago | 1

| accepted

Answered
How to find the first edge (not minimum value) after the peak?
I would use *|findpeaks|* on the _negative_ of your signal: [negpks, neglocs]= findpeaks( -aline ); Then take the first...

9 years ago | 0

| accepted

Answered
How to plot loudspeaker frequency response from its impulse response?
I would take the Fourier transform of the impulse response. (Use the <https://www.mathworks.com/help/releases/R2015a/matlab/ref...

9 years ago | 0

Answered
Undefined function 'ga' for input arguments of type 'function_handle'.
See if running these from the Command Window or a script solves the problem: restoredefaultpath rehash toolboxcache ...

9 years ago | 0

Answered
Hi i do not seem to be able to plot this graph?
You are plotting scalars against a vector. See if this does what you want: T= 4; t = linspace(-T/2,T/2); y1=(-2...

9 years ago | 1

| accepted

Answered
How can I make a pattern of binary digits like this?
Try this: M = 4; N = 2; A = dec2bin(1:2^M-1)-'0'; Result = A(sum(A,2)==N,:); Result = 0 0 ...

9 years ago | 1

Answered
How to extract MIT-BIH arrithmia data base in matlab
See <https://www.mathworks.com/matlabcentral/answers/346093-how-can-i-fix-this-error *How can i fix this error?*> (link) for a r...

9 years ago | 0

| accepted

Answered
Adding Horizontal (error) lines to a plot
I don’t have your data file, so I can’t run your code. I’m not certain what you intend with your plot statements. See if s...

9 years ago | 0

Answered
Is Ranksum function for only median value?
*_‘Is this function only for median value?’_* *Yes.* It tests for the equality of the medians of the two data vectors. ...

9 years ago | 1

| accepted

Answered
P-value using ranksum function
All your values in the *|‘A1.xls’|* file are zero. That will be a problem for *|ranksum|*. D = xlsread('Matlab A1.xl...

9 years ago | 0

Answered
Using Fill function to shade between two data plots
If you want to fill the area _between_ the plots, something like this (using the *|patch|* function) will work: t = linspa...

9 years ago | 1

Answered
Plotting sine wave for a ODE Problem
Use the *|linspace|* function to define *|‘t’|*: t = linspace(0,5);

9 years ago | 0

| accepted

Answered
Why is it shown "DOUBLE cannot convert the input expression into a double array."? And also all the variable turns to sym though I have only symbolized 3 variables.
I cannot run your code. The most likely reason for the error is that at least one of these (the only *|double|* calls in th...

9 years ago | 0

Answered
how to convert a 1X1 vactor into a matrix of 5X5
Use the *|reshape|* function: V = [[0, 1, 1, 1, 1], [0, 0, 1, 1, 1], [0, 0, 0, 1, 1], [0, 0, 0, 0, 1], [0, 0, 0, 0, 0...

9 years ago | 0

Answered
I want count iteration in a binary matrix as follows.
Try this: I=[1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1]; dI = diff(find([1 diff((I) ~= 0) length(I)])); ...

9 years ago | 1

| accepted

Answered
Weird problem with fix.
The *|format|* displays the value rounded _to the nearest integer_. The *|fix|* function rounds toward _zero_ (for both positiv...

9 years ago | 1

Answered
How to check if symbolic expression is positive?
Use the <https://www.mathworks.com/help/symbolic/isalways.html *|isAlways|*> (link) function. Since you have your complete ...

9 years ago | 1

| accepted

Answered
How to integrate the following function?
If you spell *|integral|* correctly, it works: mag = @(x)((1 - cos(x))./(1.25 + cos(x)).^1.5); q = integral(mag, 0,...

9 years ago | 0

Answered
Convert a signal in a particular frequency range
See my Answer to your other Question for the details. This filter will be: Fs = 2000; ...

9 years ago | 1

| accepted

Answered
How to apply bandpass filter
This filter will do what you want: D = load('ehgSignal.mat'); s = D.val'; Fs = 20; ...

9 years ago | 1

| accepted

Answered
How to select one of two equal minimums in a matrix?
*_‘... and the code stops since it makes them an array instead of a value ...’_* One option is to use ‘linear indexing’ and...

9 years ago | 0

Load more