Answered
Function value and YDATA sizes are not equal
‘What am I doing wrong?’ First, not posting the actual problem, that being: Warning: Failure at t=7.149052e+00. Unable t...

6 years ago | 0

| accepted

Answered
Counting duplicate values in a column
I am not certain how robust this will be for a different problem,. however it works here with the example posted: A = { 2 ...

6 years ago | 1

| accepted

Answered
Resampling non-uniformly sampled 2D Surface
Not a single function, however there are a group of functions that used in concert can do it. Try this example: x = sort(ra...

6 years ago | 1

| accepted

Answered
probability and statistics in matlab
Use the Statistics and Machine Learning Toolbox truncate function. I leave the rest to you.

6 years ago | 0

Answered
Givens rotation method to find eigen values
Instead of solve, use vpasolve here: eigen_values = vpasolve(eqn); that with your ‘A’ matrix: A =[-6 2 1;2 -9 -4; 1 -4 -9];...

6 years ago | 0

| accepted

Answered
Plotting a 3D surface from measurement datas
I suspect the griddata function would do what you want to create the surface from your vectors, however I have no idea what your...

6 years ago | 0

| accepted

Answered
Integrating above and below x axis separately
With no if blocks: t = linspace(0, 10); % Independent Variable Powers = sin(2*pi*t) + ...

6 years ago | 1

| accepted

Answered
How can I draw animatedlines in a ‘polarplot’?
I never attempted to use animatedline with polarplot. See if this does what you want: N = 10000; phi = linspace(0, 2 * pi,...

6 years ago | 0

| accepted

Answered
the meaning of length in my loop
The length function returns the largest dimension of its argument. The line: if length(n) == 1 It is not setting it equal ...

6 years ago | 1

Answered
Zero Crossing of Signal - Misunderstanding the attached matlab code.
Thank you! I recognise my code! The assignment: b = [[1;1] [x(dy(k1)); x(dy(k1)+1)]]\[y(dy(k1)); y(dy(k1)+1)]; loops thro...

6 years ago | 1

| accepted

Answered
erreor in matlab in the function freqz
The code works correctly when I run it, and indicates that it creates a lowpass filter with a passband of about . You actuall...

6 years ago | 0

Answered
different results for solving integral equation in each run
the fsolve funciton is a robust root-finding algorithm. If you plot ‘Deltagap’, you will find that it has no zero-crossings at ...

6 years ago | 0

| accepted

Answered
Throw an error message with the dimensions of a matrix
use the num2str function: M = magic(3); N = magic(4); error(['size(M) = ' num2str(size(M)) newline 'size(N) = ' num2str(size...

6 years ago | 0

| accepted

Answered
How to use ode45 to solve a system of two differential equation?
Code it correctly in the Symbollic Math Toolbox, then use odeFunction to turn it into a form that the ODE solvers can use. Al...

6 years ago | 0

Answered
Designing IIR band-pass filter for signal with white noise
The filter is unstable, and that is the problem. You can see this if you look at the coefficients returned by cheby1 and analys...

6 years ago | 0

| accepted

Answered
Computerized 3D model of tumor angiogenesis
According to PubMed, 61 articles on this subject were available by the end of 2011. Many more are now available, for example th...

6 years ago | 0

Answered
Confused with solve function.
This (typed in laboriously because you posted an image of your code rather than the code itself): syms s X(s) Y(s) U(s) TF_X...

6 years ago | 0

Answered
Trouble with graph in loop
I can’t run your code, so you’ll have to test this edit of it. Try this: %Experiment %u'=1/(1+t)^2 u(0)=0 en el intervalo...

6 years ago | 1

| accepted

Answered
Solving Second Order diff eqn.
Use the Symbolic Math Toolbox. Start by defining: syms x(t) Dx = diff(x); Dx2 = diff(x,2); I leave the rest to you.

6 years ago | 0

Answered
polyfit whats wrong?
‘why isn´t this working?’ It should throw an error telling you exactly what the problem is. When I ran the code you posted, ...

6 years ago | 1

Answered
I cant plot values above the tips of bars, XEndPoints dos not work
If you want to put the numbers on the tops of the bars, this works: x = [1 2 ]; y = [A;B]; figure Bar =...

6 years ago | 0

Answered
problem with solving integral
I suspect that the paper did not have an analytical expression for the integral, or you would be evaluating it. Integrate it ...

6 years ago | 0

Answered
Using dsolve to solve a system of differential equations analytically
The differential equation system is nonlinear, so it likely does not have an analytic solution. Try this instead: m ...

6 years ago | 1

| accepted

Answered
Problems with fprintf format (Matlab)
You have R2020a. Use writetable instead.

6 years ago | 0

Answered
How can I create a unit step function u(t) in symbolic function form?
Use the heaviside function.

6 years ago | 2

| accepted

Answered
How to apply Inverse FFT after filtering to get the original signal back?
You would have to use fftshift and then apply the results of freqz symmetrically to each half of the complex fft result, so usin...

6 years ago | 0

| accepted

Answered
create a three-dimensional surface plot
Use element-wise operations for exponentiation (.^) and division (./): z = ((x.^2)./(1+(x.^2))) + y.^2; Then, it works. Se...

6 years ago | 1

| accepted

Answered
Generated filter reduces signal time
The ‘y’ output should be the same length as the ‘x’ input. The filter should not change that. It is important not to confuse...

6 years ago | 0

Answered
Lastest version of FIR filter design in MATLAB
I only have the Signal Processing Toolbox, so I can only comment on it. See the section on FIR FIlters in Digital Filter Design...

6 years ago | 0

Answered
Why do I get error when solve the bode plot
Your code runs without error in R2020b. What MATLAB version are you using? What is the error?

6 years ago | 0

Load more