Beantwortet
Using for loops to subplot
One approach — x = linspace (1,3600,3600); y = randn(3600, 25); figure for k = 1:size(y,2) subplot(5, 5, k) plo...

mehr als 3 Jahre vor | 0

Beantwortet
Estimating a transfer function with a given Bode csv data file
Thje input is preferred, however not required. See: iddata, idfrd and related functions, and go from there.

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how to smooth or filter the signal like this?
I saved that code. I did not save the non-code text that went with it. I am not certain that I can reproduce the image that ...

mehr als 3 Jahre vor | 0

Beantwortet
Extract signal values from a data file
I am not certain what ‘identify and match’ means. It is certainly possible to filter the 40 and 75 Hz frequencies individually,...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Obtain the desired orientation without reversing the direction of the two axes
Try something like this — data = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1236147/data.txt')...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do you do a sine transform in Matlab?
In general, a Fourier transform is defined as: where: and its inverse: since apparently is in Hz (or at least not a...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How can convert line plot to bar plot
I have no idea what you want to do. Perhaps something like this — nodeSize=[50 100]; x = rand(3,2); figure hb = bar(x,...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to determine and adjust the x axis after taking the 1D FFT?
I usually do something like this — t = linspace(0, 100, 10000); % Time Vector s = sum(sin([1...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how to resume GA with saved output in script file
For future reference, consider the approach in How to save data from Genetic Algorithm in case MATLAB crashes? - MATLAB Answers ...

mehr als 3 Jahre vor | 0

Beantwortet
How to Determine the Cutoff Frequency of Butterworth Low-Pass Filter When Filtering an EMG Signal ?
Use the fft or pspectrum functions to calculate the Fourier transform of the EMG data. Use that result to define the frequencie...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to determine phase angle of an AC voltage?
Note that ‘v’ is a function of two variables, ‘w’ (that I assume is radian frequency) and ‘t’ (obviously time). The result is a...

mehr als 3 Jahre vor | 0

Beantwortet
How do I use MatLab to find a line of best fit with a predetermined y intercept using regression.
Perhaps — x = 0:250; y = randn(size(x)); B0 = x(:) \ (y(:)-1) fitline = x(:) * B0 + 1; figure plot(x, y, '.') hold o...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
The cutoff frequencies must be within the interval of (0,1).
‘The cutoff frequencies must be within the interval of (0,1).’ Divide ‘fp’ and ‘fs’ by the Nyquist frequency ‘fn’, one-half the...

mehr als 3 Jahre vor | 0

Beantwortet
How a bandpass filter (BP) can be made
Since you apparently are supposed to code it using command-line function calls in a script, and you are limited to an order 5 fi...

mehr als 3 Jahre vor | 1

Beantwortet
first order differential equation
One approach — syms y(x) x Y Dy = diff(y); Eqn = 2*x*y*Dy+(1+x)*y^2 == exp(x); [VF,Subs] = odeToVectorField(Eqn) odefcn =...

mehr als 3 Jahre vor | 0

Beantwortet
remove noise from signal
Change: [b,a] = butter(n,Wn); to: [z,p,k] = butter(n,Wn); and eliminate the tf2zp call. Then the filtfilt call should be...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to plot u(t) - u(t-2) on matlab
If ‘u(t)’ is the unit step (heaviside) function — syms t u(t) = heaviside(t); figure fplot(u(t)-u(t-2), [0 5]) grid xl...

mehr als 3 Jahre vor | 1

Beantwortet
Optimisation of parameters in coupled ODE
I’m not certain what you’re doing (and 81 parameters seems excessive), however this is the approach I use with ga to solve kinet...

mehr als 3 Jahre vor | 0

Beantwortet
str2double function multiplies values by 10e12, 10e13 and 10e14 randomly.
Try ssomething like this — data1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1233477/example...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Setting length of output vector for ode45
Choose a vector with more than two elements for ‘tspan’ for example — tspan = linspace(min(time), max(time), N); where ‘time’...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Fix the code calculate PSD
I am not certain what you are doing. The third argument to cpsd is supposed to be a window function, however in your calls to i...

mehr als 3 Jahre vor | 0

Beantwortet
how to use dataaspectratio in scatterplot?
I doubt that daspect is going to have any effect here. The only option is likely to translate one of the plots by subtracting t...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to compute number of bit change among consecutive binary numbers?
Use pdist with the 'hamming' distance metric then squareform to create the matrix — b = {'110' '101' '011' '111' '...

mehr als 3 Jahre vor | 0

Beantwortet
Symbolic Toolbox Solving for Zeros
One approach — range = [-5 5]; syms x; f(x) = sin(3*x); z = dPlotInfo(f, range); disp(z); function [zeros] = dPlotInfo(...

mehr als 3 Jahre vor | 0

Beantwortet
How do I right pad a numeric data field with invisible characters?
It would help to know more precisely what you want to do. Numeric format dexcriptors can be created as a total numeric field ...

mehr als 3 Jahre vor | 0

Beantwortet
Differentiation question - How to find out H vs. dH/dt from a list of height and datetime series?
One approach — T = ['01-Jan-2003' '17-Jan-2003' '03-Feb-2003' '20-Feb-2003' '01-Mar-2003' '15-Mar-2003' '04-Apr-2003' '...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Bode plot, plotted with experimental data
If you want to identify a system from experimental data, use the System Identification Toolbox functions, starting with iddata, ...

mehr als 3 Jahre vor | 1

Beantwortet
How can I delete last two colum in a matrix?
Try something like this — A = rand(7,5) Anew = A(:,1:end-2) .

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how to extract y as a function of x
Try something like this — syms x y a b x0 y0 tr sympref('AbbreviateOutput',false); Eqn = (a^2*sin(tr)^2+b^2*cos(tr)^2)*(x-x0...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to invoke and use GA tool in Matlab R2022b?
If you are doing parameter estimation, this approach will likely work — x = 1:0.1:10; y = 2.5*exp(-(x-5).^2/2)+randn(size(x))...

mehr als 3 Jahre vor | 0

| akzeptiert

Mehr laden