Answered
How do I find location of my specific peak in ECG signal?
‘I have written the code for butterworth filter and had to invert my signal to find signal since my T wave and R wave were the s...

4 years ago | 1

| accepted

Answered
How to convert decimal time to HH:MM:SS
Try this (assuming that the decimal times are fractions of a day) — T1 = readtable('https://www.mathworks.com/matlabcentral/an...

4 years ago | 1

| accepted

Answered
plot conical surface knowing circle points cordinates and vertex cordinates
Two options — r = [5; 0.01]; % [lower radius; upper radius] ...

4 years ago | 0

Answered
Testing slope of line created with polyval for significance (slope ~= 0)
I am not certain what you are asking. If you are doing a linear regression, then use fitlm with the same data you used with p...

4 years ago | 0

Answered
Matlab does plot datetime data (only hours) on wrong day
Without having the data to experiment with, my only suggestion is to plot them after converting them to duration arrays (that it...

4 years ago | 1

| accepted

Answered
Plotting trajectories of the linear oscillator on different time intervals
Nothing is wrong. The [ 4] solution iterates through the loop twice, and the time instants at which the code is evaluated are...

4 years ago | 1

| accepted

Answered
Replacing values in array with values from another array
Try this — test_array = [1 2; 2 3; 1 3]; test_upper_triangular_array = [0.5 0.25 0.7; 0 0.8 0.6; 0 0 1.1] lidx = sub2ind(siz...

4 years ago | 1

| accepted

Answered
Get the value from coloumn correspond to the another coloimn max element
Try this — M = rand(10,2) [Col1Max,idx] = max(M(:,1)) Result = M(idx,2) .

4 years ago | 0

| accepted

Answered
Only producing one graph rather then range of graphs.
It appears that the last plot overplots all the previous plots. Perhaps adding a figure call will do what you want — figure ...

4 years ago | 1

| accepted

Answered
How to use while loop for Matrix operation using Backslash
Perhaps — D = randn(10,4); T = randn(10,1); v1 = ones(size(T)); for k = 1:size(D,2) X(:,k) = [D(:,k) v1] \ T; v...

4 years ago | 1

| accepted

Answered
plotting mutiple curve in the same graph
Here are two options — dataset = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1067780/modifiedDa...

4 years ago | 0

| accepted

Answered
How do I fit a curve with a custom equation and a loop?
The posted code needs the required variables and functions necessary to run it. That aside, trysoimething like this — a = l...

4 years ago | 0

| accepted

Answered
Linspace function in for loop
Try this — delta_l_2 = 1; % change in length of tendon 1 and tendon 2 (assume to be the same) length_1_range = 10:-delta_l_2:...

4 years ago | 0

| accepted

Answered
Fitting Kinetic model to estimate kinetic parameter.
I was able to get a reasonably decent fit with the ga function: Elapsed Time: 3.281440000000000E+02 00:05:28.144 Fitness...

4 years ago | 0

Answered
Problem with function envelope
The transition in the signal baselline is confusing envelope. It may be necessary to change the ‘np’ value, possibly to a lower...

4 years ago | 0

| accepted

Answered
Needing to increment a number within a sin function
Try something like this — S = 10*sin(diag(0:19)) See the documentation on diag for details. .

4 years ago | 1

Answered
Normalizing data to 100 Percent
One option with normalize is to use the 'range' method or methodtype, and multiply the result by 100. See the documentation for...

4 years ago | 0

| accepted

Answered
Matlab Integral function for a self teaching beginner
The integral function numerically integrates the function supplied to it over the variable range defined in the function call. ...

4 years ago | 0

| accepted

Answered
Contourf plot Yscale log2 vs log10
You can change the base of the logarithm by dividing it by the desired base, then use the appropriate code to change the tick la...

4 years ago | 0

| accepted

Answered
I can't figure out this array issue using an integral command
Use the 'ArrayValued' name-value pair — format longE ZZ=linspace(0,100,10); Time=linspace(0,100,10); zeta=1; D=.36; con...

4 years ago | 0

Answered
How to use logical indexing to return elements of a signal?
Try this — StartIndices = find(Lv2); StartIndices = StartIndices(1:end-1); EndIndices = find(Lv1); EndIndices = EndIndices(...

4 years ago | 0

| accepted

Answered
Requirements for Matlab and Simulink
See for example System Requirements for MATLAB 2022a. There are links on that page for other releases and other information.

4 years ago | 0

Answered
New line when writing to a text file using fprintf?
The newline character for fprintf and its friends is '\n', so perhaps: fprintf(fo,'{translate([%d,%d,0]);cylinder(%d,%d,%d);}\...

4 years ago | 0

| accepted

Answered
Why and what should I do if a signal ampiltude decreased so much after it passed a low-frequency and a high-frequency butterpass filter
The filtering operation removed much of the signal energy. To amplify it, just multiply it by a constant: D2 = D2*10; Choo...

4 years ago | 0

| accepted

Answered
How to identify both sides of a flat peak (flat part of a signal)?
Use the islocalmin (introduced in R2017b) function instead of findpeaks — LD = load('signal.mat'); force_y_r = LD.force_y_r; ...

4 years ago | 0

| accepted

Answered
Plots in a loop
Perhaps: title(sprintf('data %3d',k)) .

4 years ago | 0

Answered
why do i get ylabel error?
The error shown, that the string is interpreted as an index leads me to believe that you have a variable named ‘ylabel’ and MATL...

4 years ago | 0

Answered
How to remove certain tick labels from xaxis in line plot
Try something like this — t = linspace(0, 3000, 3000); s = (sin(2*pi*t*5)>0.9)*6.8 + 0.1; figure plot(t, s) figure pl...

4 years ago | 0

| accepted

Answered
Transform data from long to wide format
Use unstack, preferably the same unstack call with the same MATLAB version that produced the ‘data_wide’ file. Experiment wit...

4 years ago | 0

Answered
How to ignore peaks and find the x-axis location of the others?
I am not exactly certain what you want, however selecting and plotting the first peak after each valley (minimum of the inverted...

4 years ago | 0

| accepted

Load more