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

22 days ago | 0

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

23 days ago | 0

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

23 days ago | 0

| accepted

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

23 days ago | 0

| accepted

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

24 days ago | 0

| accepted

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

24 days ago | 0

| accepted

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

24 days ago | 1

| accepted

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

25 days ago | 0

| accepted

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

25 days ago | 0

Answered
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’ ...

26 days ago | 0

| accepted

Answered
Calculate the maximum and minimum values and what day these values occured
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...

26 days ago | 0

| accepted

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

26 days ago | 0

| accepted

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

26 days ago | 0

| accepted

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

26 days ago | 1

| accepted

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

26 days ago | 1

| accepted

Answered
UNABLE TO PERFORM ASSIGMENT BECAUSE THE SIZE OF THE LEFT SIDE IS 1 BY 1260 AND THE SIZE OF THE RIGHT SIDE IS 1 BY 5040
One approach to fixing it (at least temporarily) is to save it to a cell array: trainingFeatures{i} = extractHOGFeatures(img, ...

26 days ago | 0

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

27 days ago | 0

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

27 days ago | 0

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

28 days ago | 0

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

28 days ago | 0

| accepted

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

28 days ago | 1

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

28 days ago | 1

| accepted

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

28 days ago | 0

| accepted

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

28 days ago | 0

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

29 days ago | 0

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

30 days ago | 0

Answered
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), ...

30 days ago | 1

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

30 days ago | 0

| accepted

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

1 month ago | 0

| accepted

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

1 month ago | 0

| accepted

Load more