Risposto
where I am making a mistake while using fsolve to evaluate two unknown with two equation
Only one minor problem. The fsolve function needs and returns a vector of paramters. Changing that call to: x=fsolve(@(b)f...

circa 3 anni fa | 0

| accettato

Risposto
Why is nothing showing up on my plots?
It now fills the matrices corrrectly and plots something, however I cannot determine what you want it to plot — % Regarding th...

circa 3 anni fa | 0

Risposto
integral() doesn't accept scalar function as input
It works correctly with the 'ArrayValued' name-value pair — Psi = @(x) [1 x] fun = @(x) abs(Psi(x)*Psi(x)') integral(fun,0,1...

circa 3 anni fa | 1

| accettato

Risposto
How to plot a graph showing the upper and lower boundaries of data?
With random points, constructing the limits is a bit more of a challenge. I use the boundary function here, although there ar...

circa 3 anni fa | 0

Risposto
How to determine phase shift between two waveforms?
I am not certain what you want. The easiest way too analyse the phase differences is to do a Fourier transform of the signals...

circa 3 anni fa | 1

| accettato

Risposto
finding a trend line where x axis semilog and y axis linear and trend line follow the eqn y=a*exp(b*x)
AA straight horizonta line would be the best model, since ‘Depth’ does not change at all over time — T1 = readtable('data_mat_...

circa 3 anni fa | 0

Risposto
Adding vertical trendline for mutiple y variables in one scatterplot
One option is to simply reshape all of the different ‘x’ and ‘y’ data vectors (combined into matrices here for convenience) into...

circa 3 anni fa | 0

| accettato

Risposto
inverse log of a number
I have no idea what ‘logtcorr’ is. However, exp is the inverse of log, with 10^arg being the inversee of log10 and others fol...

circa 3 anni fa | 0

Risposto
plotting horizontal scatter plots
Reverse the ‘x’ and ‘y’ coordinates in the scatter plot — x = 1:5; y = rand(size(x)); figure barh(rand(size(x))) hold on...

circa 3 anni fa | 0

| accettato

Risposto
how can i use integral function with vector limits by using another for loop ?
All the vectors have to be the same size ()so I shortened ‘m’ here), then arrayfun works (and so would a loop, indexing each vec...

circa 3 anni fa | 1

Risposto
stacked plots with contour- custom lsyout
It is likely easiest to use subplot because it allows more options for the axis sizing, while the others (tiledlayout and stacke...

circa 3 anni fa | 0

Risposto
Parameter Estimation of a model
I would do something like this — Data = [(0:10).' rand(11, 3)]; % Data = [Time Current Voltag...

circa 3 anni fa | 0

| accettato

Risposto
I have an indices error in my code
The problem is that in the ‘Update floater positions’ loop, both ‘ix’ and ‘iy’ are NaN at some point, and that throws the indexi...

circa 3 anni fa | 0

Risposto
How to calculate every peak in plot
Peak locations, full-width-half-maximum, and areas — fabric_image = imread('Kain1.png'); % Replace 'fabric_image.jpg' with the...

circa 3 anni fa | 0

Risposto
Need to count projections from a graph
It depends on what information you want. The red line appears to interpret the results of the image behind it, so it would like...

circa 3 anni fa | 0

| accettato

Risposto
Calculate SNR from sampled real signal
The Signal Processing Toolbox snr function (introduced in R2013b) has a number of different ways to calculate it. If you only h...

circa 3 anni fa | 0

Risposto
I want to calculate the moving rms of accelerometer data.
Try something like this — Fs = 5000; T = 100; t = linspace(0, T*Fs, T*Fs-1)/Fs; s = sin(2*pi*t*25); xrms = @(s, n) sqrt(...

circa 3 anni fa | 0

| accettato

Risposto
lsqcurvefit Fitting kinetic model to estimate kinetic parameter.
That does not appear to me to be the same data. I get decent results except for and , leading me to believe that there is so...

circa 3 anni fa | 2

| accettato

Risposto
Accessing local variables in a function.
One option would be to return it as an output. I am not certain which one you want to return, however assuming that it is ‘No...

circa 3 anni fa | 1

| accettato

Risposto
How to get rid of spikes from the attached graph
It would help to know what the data represent. Try this — LD = load('batterycellhighvoltage.mat') M = LD.BMC_PACK1_CellHig...

oltre 3 anni fa | 0

Risposto
Help interpreting Fast Fourier Transform.
My analysis — M1 = readmatrix('fftpoop') t = M1(:,1); s = M1(:,2); L = size(M1,1) Ts = mean(diff(t)); Fs = 1/Ts; Fn = ...

oltre 3 anni fa | 1

| accettato

Risposto
How can I plot transfer function?
You can use the transfer function that you posted, if you define ‘s’ first, using the tf function. If you want the magnitude ...

oltre 3 anni fa | 0

| accettato

Risposto
dlmread error when performing fourier transform (FFT)
You could use the deprecated csvread function, however readmatrix is preferred, since the data are numeric and the variable name...

oltre 3 anni fa | 1

| accettato

Risposto
Creating 3d surf from 2d map
It would help to have the data. That aside, the plot would go something like this (I got tired of all that typing, so there a...

oltre 3 anni fa | 1

| accettato

Risposto
Finding max peaks and full width/half max for both curves in the given plot
It would help to have the data. Calculating the statistics of the peaks depends on how the peaks are defined. This defines t...

oltre 3 anni fa | 1

| accettato

Risposto
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...

oltre 3 anni fa | 0

| accettato

Risposto
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....

oltre 3 anni fa | 0

| accettato

Risposto
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...

oltre 3 anni fa | 0

Risposto
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...

oltre 3 anni fa | 0

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

oltre 3 anni fa | 1

Carica altro