Answered
Is it a bug?
You have encountered ‘floating-point approximation error’. See Floating-Point Numbers for an extended discussion. Also see...

7 years ago | 1

| accepted

Answered
fminsearch and simulated annealing with penalties
The siumlannealbnd function only permits range bounds on the parameters. The ga function permits linear and nonlinear constrain...

7 years ago | 0

Answered
I am trying to write a short script that finds when an equation stops decreasing and starts increasing again, keep getting error
Define 'y' as an anonymous function: y = @(t) 3.*t.^2+2.*t+40; There are still a few problems. I will let you sort those.

7 years ago | 0

| accepted

Answered
How to generate a time-continuous rectangular signal from given rise-time and over-shoot?
The Signal Processing Toolbox pulstran function (related are rectpuls and square) will likely do what you want.

7 years ago | 0

| accepted

Answered
How can I numerically solve a system of ode's that contains a lowpass filter in MATLAB?
In ODE functions passed to ode23 (or any of the other ODE solvers), the arguments passed to ‘myFunc’ or any other such fucntion ...

7 years ago | 0

| accepted

Answered
How to combine 3 for loops into one?
Try this: Rv = [54:56; 69:71; 39:41; 84:86]; % Row Start Matrix Cv = 16:18; ...

7 years ago | 0

| accepted

Answered
How to solve system of second order nonlinear differential equations?
Substitute these for what you currently have: % Solve the System of First-Order ODEs interval = linspace (0,20,250); Init = ...

7 years ago | 0

| accepted

Answered
Plot function to graph differential equations
Use a different tspan vector. When I run your code (using random values for ‘A’ and ‘B’, since they are not supplied), I get:...

7 years ago | 0

| accepted

Answered
how to convert UTC to IST(indian standard time)
If you have R2014b or later, datetime will do this easily. Try this: TUCT = {'08:29:54' '08:30:55' '08:31...

7 years ago | 2

| accepted

Answered
How do I get MatLab to format to three (3) deceimal places?
The round function has several options, however using it will change how the numbers are represented internally, not only how t...

7 years ago | 1

| accepted

Answered
Error fsolve undefined function or variable x.
One problem is that you are calling fsolve from within the ‘prova’ function. Try this: function F = prova(x) k=1.38E-23; ...

7 years ago | 0

| accepted

Answered
FIltering for multiple band of frequncies
As much as I like elliptic filters, creating three of them and filtering them in parallel is simply not efficient. Multiband fi...

7 years ago | 2

| accepted

Answered
Add a 1 minute tolerance when comparing datetimes
I am not certain what you want, since the tables are difficult to interpret. Try this to see if it provides the necessary res...

7 years ago | 1

| accepted

Answered
fplot add an undesired line
The gray line (that is always present (although it changes with the LineWidth parameter) indicates that the function increases o...

7 years ago | 1

| accepted

Answered
Find Ultimate Tensile Strength (max/peak of graph) given Stress and Strain Data
This line: matrix(matrix < 0.015) = NaN; %Ignores Values less than 0.015 is inserting NaN values into ‘matrix’, and that is c...

7 years ago | 0

Answered
How to read files containing dates in the name in a loop?
If you have R2014b or later, use datetime to create a vector of dates, then compose (R2016b) to create a vector of filenames: ...

7 years ago | 2

Answered
Connect a group of lines into surface plot
Just use the surf (or mesh) function: x = [(1:16)', (20:35)']; %size 2 x 16 y = [(20:35)', (100:115)']; % size 2 x 16 z...

7 years ago | 0

| accepted

Answered
how can I fit nonlinear regression equations with a set of data
There is no relationship. Every value in the third column is uniformly 1: T = readtable('data1.xlsx','ReadVariableNames',0); ...

7 years ago | 0

| accepted

Answered
Adding rows to matrix based on if-statement in loop
A = randi(9, 7, 5); % Original Matrix B = randi([51 59], 2, 5); ...

7 years ago | 0

| accepted

Answered
find peaks of a flat signal
If you have R2017b or later, use the islocalmax function, specifcially as described in the Flat Maxima Regions documentation sec...

7 years ago | 1

| accepted

Answered
Not enough input arguments.
You did not pass ‘IC’ (and likely others) as an argument. Check to be certain you are calling the function correctly in your ...

7 years ago | 0

Answered
How to create a transfer function system model from code with given parameters?
Try this: numerator = [0 0.9614 0]; denominator = [1.0000 -1.6634 0.8313 0]; tf_si = tf(numerator,denominator,'ts',1, '...

7 years ago | 0

| accepted

Answered
Controlling certain parameters of a two y-axes plot
Note that TickLength is part of Axes Properties, not Figure Properties. Use gca, not gcf.

7 years ago | 0

| accepted

Answered
Undefined function or variable 'z' and error with ode45.
You defined: zspan = [0 200]; % Range for the independent variable so your ode45 call needs to be: [t,y] = ode45(@ODEfun,zs...

7 years ago | 1

| accepted

Answered
How do I plot the step response at t=5 using Matlab?
Since: syms s t stp5 = laplace(heaviside(t-5),t,s) is: stp5 = exp(-5*s)/s one approach would be to multiply it by (conv...

7 years ago | 0

| accepted

Answered
Graph output of a system from transfer function raw data
I am guessing that your transfer function data is the result of something like: H = fft(output)./fft(input) If you also have ...

7 years ago | 0

Answered
Limit significant figures to 2 significant figures
Using the round function and the option in: Round Elements to Specified Number of Significant Digits is likely to be more consis...

7 years ago | 3

| accepted

Answered
Correcting for baseline drift and determining the isoelectric line of an ECG
Try this: Y = load('sample_data_y.mat'); T = load('sample_data_x.mat'); EKGII = Y.lead2_extended_trace_y; t = T.lead2_exten...

7 years ago | 1

| accepted

Answered
How do I plot N arrays at the same time as a animation?
I am not certain what you want to do. There are several functions to produce animated plots in MATLAB. One such is drawnow, so...

7 years ago | 0

Answered
how can i plot 3 parameters in (x y) axis as shown in fig
Use the contour function with the matrix of the results of your calculations.

7 years ago | 0

Load more