Risposto
Calculate mean from for loop and plotting means for separate for loop
There was an out-of-order statement (‘T’), no subscripting of the ‘Avg_power’ vector, and the wrong independent variable argumen...

oltre 3 anni fa | 0

Risposto
Compute RMS value over 1-second intervals
Try this — movrms = @(A,k) sqrt(movmean(A.^2,k)); Fs = 1000; T = 10; t = linspace(0, T*Fs, T*Fs+1).'; s = randn(size(t))...

oltre 3 anni fa | 0

Risposto
Identifying errors in datetime input strings
If you already know the date fields for day, month, and year, one approach would be to use the eomday function to determine the ...

oltre 3 anni fa | 1

| accettato

Risposto
Filtfilt returns NaN matrix
The transfer function implementation of the filter is unstable, however I cannot determine the reasson for the instability, alth...

oltre 3 anni fa | 0

| accettato

Risposto
How to determine dates when aircraft moving northwards or southwards?
I am not certain that I understand what you want. This approach uses day differences to segment the data into individual ‘Fli...

oltre 3 anni fa | 0

| accettato

Risposto
I get error when I try to plot sigmoid function
Subscript ‘dt’. However the loop is not necessary and does not appear to plot the desired function — M1(1)=0; t(1)=0; h=0.0...

oltre 3 anni fa | 0

| accettato

Risposto
Bode diagram : Warning: Error occurred while evaluating listener callback.
Your code runs without error in R2023a. Perhaps an upgrade is in order — w_0 = 100; D = 10; K = 26.5; s = tf('s'); G = w...

oltre 3 anni fa | 0

| accettato

Risposto
hello, kindly help, I am getting the following error why?: Error using bvp4c Unable to solve the collocation equations -- a singular Jacobian encountered. Error (line 7)
The initial conditions are both 0. Setting them to something else (here eps) solves the immediate problem, and using element-wi...

oltre 3 anni fa | 0

Risposto
trying to solve two non-linear simultaneous equations but I had an error figuring out my two unknowns (X(1) &x(2)) , can anyone pls help?
I cannot fun images of code, only code in text format. I can’t even see all of ‘F’. The problem is the choice of initial con...

oltre 3 anni fa | 0

Risposto
Read CSV into table but not all of the columns
Without at least an example of your .csv file it is difficult to determine that. One option (for both readtable and readmatrix)...

oltre 3 anni fa | 1

Risposto
from cell to datetime
Use 'eeee' for the full name of the day — a={'Monday, 03-Jul-2017 15:00:00'}; datetime(a,'InputFormat','eeee, dd-MMM-yyyy HH:...

oltre 3 anni fa | 1

| accettato

Risposto
How to place tick-labels on the axis, essentially replacing the ticks with the labels?
Perhaps something like this — x = 5:5:25; y = randn(size(x)); figure plot(x, y) xt = xticks; xtl = xticklabels; text(x...

oltre 3 anni fa | 0

Risposto
How do I plot a phase plot for FFT and code time history for down-sampled signal?
Perhaps this — data = [0 0.829668000000000 0.00833300000000000 0.829801000000000 0.0166670000000000 0.82881000000000...

oltre 3 anni fa | 0

| accettato

Risposto
Not enough input arguments
The ode45 call needs to be — [t,y] = ode54(@(t,y)assignment(t,y,u,d), tspan, ic) where ‘u’ and ‘d’ have previously been defin...

oltre 3 anni fa | 0

Risposto
How to output a cell array as a table where the arrays contain vectors of different length?
The cell2table function is an option — V1 = randn(5,1) V2 = randn(10,1) C = {V1 V2} T = cell2table(C) T{:,1}{:} T{:,2...

oltre 3 anni fa | 0

| accettato

Risposto
I have a set of data that I need to separate into unequal intervals in order to calculate the RMS value of these data (The data points are continuous over time)
It is not obvious to me exactly what you want to calculate. This isolates the regions between the spikes (that I refer to as ‘s...

oltre 3 anni fa | 1

Risposto
How to find time step of video signal?
In the VideoReader documentation, see both FrameRate, and CurrentTime for each frame since the time steps may not be constant. ...

oltre 3 anni fa | 0

| accettato

Risposto
How can I plot an equation that includes sigma?
I changed ‘t’ to ‘tv’ and then created ‘t’ in each iteration as ‘tv(k1)’ to produce a vector for ‘total’ that is then plotted at...

oltre 3 anni fa | 0

| accettato

Risposto
write matrix into a new file everytime a value of one column changes
One approach — T1 = array2table([ 0 0.55 0.1 1 0.37 0.1 2 0.03 ...

oltre 3 anni fa | 0

| accettato

Risposto
Findpeaks the reason why my index is floating
The findpeaks function is interpreting the ‘20’ argument as a sampling frequency, and so is returning the position of the peak a...

oltre 3 anni fa | 2

| accettato

Risposto
I have set of data that I need to fit to a function and I don't seem to get the fitting to work
That function is linear in the parameters (the partial derivatives of the function with respect to each parameter is not a func...

oltre 3 anni fa | 0

Risposto
how to get txt data from fig / plot, if there are multiple curves?
I do not understand what you want to do. Getting the information on the line objects is straightforward — I = openfig(websave...

oltre 3 anni fa | 0

| accettato

Risposto
How to design filter order for high-pass butterworth filter
To determine the optimal order, use the buttord function. Wp= fc/(fs/2); %Threshold Frequency Ws = 0.95*Wp; Rp = 1; Rs = 6...

oltre 3 anni fa | 0

| accettato

Risposto
gradient with irregular grid
The gradient function assumes a fixed step size for the second argument. The way I calculate the numerical derivative using a...

oltre 3 anni fa | 0

| accettato

Risposto
I am trying to Import .csv or excel file into Matlab but its not showing dates after 12th of every month, instead showing NaT. Please Help.
I have never used datastore arrays, however looking at the documentation, it is likely best to select DatetimeType as 'text' and...

oltre 3 anni fa | 1

| accettato

Risposto
how do I write an equation from matlab to latex?
If you have the Symbolic Math Toolbox, use the latex function.

oltre 3 anni fa | 1

Risposto
loop error with "unique" and "interp1"
To avoid all the problems about having unique values in one of the vectors, select a narrow range for the interpolation. That (...

oltre 3 anni fa | 0

| accettato

Risposto
How would I plot signal energy of a .wav file making sure that time is the value of the x-axis?
The audioread function returns the signal amplitude matrices and the sampling frequency. To create a time vector for the ‘y’ da...

oltre 3 anni fa | 0

Risposto
How to find angle between a fixed point to multiple point ??
Perhaps this — M = load('M.mat'); M = M.M; N = load('N.mat'); N = N.N; xv = 506; ...

oltre 3 anni fa | 0

| accettato

Risposto
I have the following signal with some peaks and some valleys. Is it possible to make the baseline zero?
The approach I would take would be to find the minimum just before each of the tall spikes (use findpeaks or islocalmax to find ...

oltre 3 anni fa | 0

Carica altro