Answered
lsqcurvefit (with system of ODEs) does not iterate, it only displays the initial guess value
It is generally good practice to estimate the initial conditions as well, so I added that (not part of my original code, updated...

3 years ago | 0

| accepted

Answered
How to understand the design of lowpass butter filter?
It is best not to use the transfer function implementation of discrete (digital) filters, because those are frequently unstable....

3 years ago | 0

| accepted

Answered
Finding Highest Frequency Component from a Sound Recording
The audioread function has two outputs, the first being an (Nx2) matrix (the information) and the second being the sampling freq...

3 years ago | 0

Answered
Detect the boundary of signal
This is easier if you have the envelope function (introduced in R2015b) since it has options that hilbert does not — readExce...

3 years ago | 0

Answered
Breaking the axis of plots
Perhaps this — x = [linspace(0, 10, 21); linspace(40, 42.5, 21)]; % Create Da...

3 years ago | 1

Answered
How to find the intersection of two curves with the input data being two vectors?
Another approach — lambda = linspace(0, 10); arg_px = sin(2*pi*lambda/5); arg_ikTx = 1.1 - (lambda/8); L = numel(lambda);...

3 years ago | 0

Answered
How to extract specific data from a txt file
Using my code from my earlier Comment, one approach would be— % type('Niskin-Logger-Sample.txt') opts = detectImportOptions('...

3 years ago | 0

Answered
textbox doesnt like strings
The string array properties are a bit different from cell arrays in that string arrays can be grouped using square brackets [] w...

3 years ago | 0

| accepted

Answered
Normalized Wind Rose Plot help
Perhaps something like this — LD = load('winddata.mat'); N = LD.N; N.WD_Rad = deg2rad(N.WD_Deg) ...

3 years ago | 1

| accepted

Answered
Tiledlayout with different spacing in horizonal and vertical direction
The tiledlayout function does not offer any spacing options other than those provided, and they cannot be changed afterwards (at...

3 years ago | 0

| accepted

Answered
How to fix such type of problem?
The firstr two appear to be exactly the same, so they are over-plotting. % the variables are present at attached file LD1 ...

3 years ago | 1

| accepted

Answered
shaded area between 2 curves isnt showing up
There were two problems — First, the vectors are column vectors, not row vectors, so fliplr will not have any noticable effect...

3 years ago | 1

| accepted

Answered
It says Error in matlab and also in cumtrapz
In the ‘calculateShearForceAndBendingMoment’ call, ‘shearForce’ is a scalar, so the following cumtrapz call throws the error, si...

3 years ago | 0

Answered
I would like know the code for FIR filter respose
I have no idea what an ‘asteroid’ filter is, at least iin the context of signal processing. There are several ways to design ...

3 years ago | 0

| accepted

Answered
Removing noise peaks on 3D surface reconstruction
See if the filloutliers function (introduced in R2017b) will do what you want. The documentation indicates that it will work o...

3 years ago | 0

| accepted

Answered
Filter Only Data Meeting Certain Criteria out of Excel Spreadsheet
Use ‘logical indexing’ to return the desired values — Lat = 90*rand(10,1); Angle = pi*rand(size(Lat)); Data = table(Lat,An...

3 years ago | 0

Answered
fitting "K" paremeter in a adsorption breakthrough curve data
Estimating ‘K’ is likely straightforward, and requires creating an objective function similar to the ‘kinetics’ function here, d...

3 years ago | 0

Answered
Problem to read the number of characters in a line
Try something like this — Unz = unzip('SGC2023aiexsm_BLMC_10.zip') type(Unz{1}) ...

3 years ago | 0

| accepted

Answered
How color fill grid squares in plot?
The patch function would be appropriate here. Perhaps something like this — x = 0:5:20; y = 0:7; figure patch([5 10 10...

3 years ago | 0

Answered
How to plot discrete array with colors
One approach — status = randi([0 1], 1, 9) % 'Waiting' = 0, 'Busy' = 1 status = flip(status...

3 years ago | 0

Answered
Adding error bars to a grouped bar plot
An example using properties available in prior and recent MATLAB releases is provided in Putting error bars on bar plot? One ...

3 years ago | 0

Answered
Aplly average to a set of data
This seems to be a slightly different version of your earlier Question: Plot data from txt file. This does the same thing,, e...

3 years ago | 0

| accepted

Answered
Alternating between if conditions in a loop.
I am not dertain what you want to do. I would use either findpeaks (with normal and negated arguments to get the peaks and trou...

3 years ago | 0

Answered
How to calculate FWHM on the graph
Try this — LD1 = load('xstats.mat'); xstats = LD1.xstats LD2 = load('ystats.mat'); ystats = LD2.ystats F = openfig('gr...

3 years ago | 0

| accepted

Answered
How to calculate FWHM on the point
Those fields do not exist in ‘stats.mat’ so those are empty vectors and the error is obvious. This works — LD = load('stats...

3 years ago | 0

Answered
Apply apodization to NMR spectra
I am not certain what you want to do. (I had to look up ‘Apodization’ and discovered that in the context of Fourier transforms,...

3 years ago | 0

Answered
fmindnd problem doesnt run
It runs here — g=9.81;zo=50;vo=15;m=50;c=13; z=@(t) -(zo+m/c*(vo+m*g/c)*(1-exp(-c/m*t))-m*g/c*t); [xmin fval]=fminbnd(z,0,8)...

3 years ago | 0

Answered
How to enter multiple parameter estimations in a single genetic algorithm (GA)
This works. I will let you tweak it to give the appropriate results, since I have no idea what system you are modeling. I ha...

3 years ago | 0

| accepted

Answered
organize the inside of the .txt file
Define the delimiter in your writetable call to be the tab '\t' character — type('data.txt') type('data_new.txt') T1 = rea...

3 years ago | 0

| accepted

Answered
How to filter an EEG signal from eye blinking, electrodes movement and calculate the evoked potential?
The EEG signal does not need filtering. It is not significantly noisy, and it is obvious that a 50 Hz mains interference peak h...

3 years ago | 0

Load more