Beantwortet
How to obtain correct frequency and amplitude via FFT
Increase the frequency resolution (I doubled it here, although you can increase it further) with nfft = 2^nextpow2(nt_sign)*2 ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how could i plot x^2+(y-x^3/2)^2=1 ?
Perhaps this — syms x y m(x,y) = (x^2+(y-x^3/2)^2-1); figure fimplicit(m, [-1 1 -1 1]*1.5) grid axis('equal') xlabel...

mehr als 3 Jahre vor | 0

Beantwortet
What is the rating of the Parks-McClellan FIR degree?
According to the documentation, the order of the filter is ‘n’ (the first output).

mehr als 3 Jahre vor | 0

Beantwortet
I want to save [pks,locs] data for every iteration
Since the ‘[pks,locs]’ data may not be the same in every iteration, save them to cell arrays — [pks,locs] = findpeaks(sgf,'min...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Find closest value for each row in timetable
I am defining ‘closest’ as the minimum absolute difference between ‘Var1’ and the last two variables. (My attempt at a more d...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Group data based on direct
One way to do this would be to use the histcounts function and get the first three outputs — WindDir = rand(100,1)*360; edgev...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
cannot find existing number
See the documentation section on Floating-Point Numbers for a full explanation. Actually, I can’t reproduce that exact proble...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Plotting amplitude spectrum of a signal
Try something like this — tmax=0.5; t=0:0.001:tmax; fs=1000; tsamp=0:1/fs:tmax; f1 = 18; f2 = 321....

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Sort a bank of ECG samples to 2 groups
This is the best I can do for these. They required a significant amount of processing to remove the baseline variation and hi...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to find THD?
If you’re referring to total harmonic distortion, see the Simscape Electical function ee_calculateThdPercent.

mehr als 3 Jahre vor | 0

Beantwortet
How do I get rid of the horizontal line on the y-axis in a line plot? Please see attached image below as an example. I want the horizontal line hidden.
Since: [x1,fs1]=audioread('Aniruddha heart beat.wav'); and x1 = 962560*2 the red line is likely the second channel in ‘x1’ ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Calculate the maximum and minimum values
I thought we covered a version of that in my Comment to your other thread. That dealt with the hour that the daily maximum oc...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Saving data from a for loop (new-ish to MATLAB!)
Save the ‘datatable’ output to a cell array — mn_start=9; %month to start dd_start=11; %day to start date...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
error "Invalid parameter name: CriticalValueType." in example code.
If I understand correctly what you’re doing, that version of the multcompare function was introduced in R2022b, according to the...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to find number of counts for atoms (each minor grid) within XY grid?
I am not certain what you want. The histogram2 function is one option — T1 = readtable('https://www.mathworks.com/matlabcen...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
I am trying to plot acceleration-time graph by using a txt file but I got error.
The columns are reversed from your assignments. The first column is the signal, and the second column is the time vector. Tr...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
String date and time identification
If they all have the same format — date= '2021-07-011407404.5' DT = datetime(date(1:16), 'InputFormat','yyyy-MM-ddHHmmss', 'F...

mehr als 3 Jahre vor | 0

Beantwortet
how to convert a Laplace transform into a transfer function value
The ‘d’ expression currently exists as a symbolic object. It needs to be transformed into a double value and then to a system o...

mehr als 3 Jahre vor | 0

Beantwortet
Error using Dsolve: "Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be symbolic variables, and..."
The differential equations are nonlinear, so it is highly unlikely that there is an analytic solution for them. Integrate the...

mehr als 3 Jahre vor | 0

Beantwortet
convert a string into a date and time format
Try something like this — m ='October17,196616:41:00'; DT = datetime(m, 'InputFormat','MMMMdd,yyyyHH:mm:ss', 'Format','yyyy/M...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
I want automatic tuning of RF filter screws
I do not have the RF Toolbox, however creating a filter as an anonymous function with appropriate arguments (I just use the pass...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Different tick values on same axis
See if the xticks call in: xticks([a+g:dxf:b-g (b-g+dxs):dxs:b]) does what you want — a=0; b=4; c=0; d=6; g=1; dxs=0.2...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Vertical line in plots
The xline function will plot a vertical line between the limits of the y-axis at the chosen x-value. To plot a vertical line onl...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Detecting start and end of signal
Try something like this — M1 = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1251052/P05%20Trial%...

mehr als 3 Jahre vor | 0

Beantwortet
Uploading my code, with DataSet on this forum
The ‘Help’ section (click on the ‘More’ just to the right of ‘Browse’ above the title in this page and select the last item in t...

mehr als 3 Jahre vor | 0

Beantwortet
How can i solve the Too many output arguments error problem ?
You are overshadowing the error function (although there are also two other error functions in the Statistics and Machine Learni...

mehr als 3 Jahre vor | 0

Beantwortet
How order a dataset
One approach is to usee the sortrows function — Data = table(randi(1E4,6,1),['M';'B';'M';'M';'B';'B'], rand(6,1), randn(6,1), ...

mehr als 3 Jahre vor | 1

Beantwortet
Plot smoothing line without points
I am not certain what you wnat to do. Taking a guess — N = 20; x = sort(randn(1,N)); y = randn(1,N); xs = linspace(min...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Converting cell in double
Try something like this — LD = load(websave('ids','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1249257/ids....

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
binary vector that consists of a zero for normal years and a 1 for a leap year
Use the eomday function — YearVct = 1950:2050; Lv = eomday(YearVct,2) == 29 % Create Logic...

mehr als 3 Jahre vor | 0

| akzeptiert

Mehr laden