Answered
Count the number of "aggregate" peaks in a vector?
I am not certain what result you want. Here, findpeaks finds 21 distinct spikes (and their locations) LD = load('buzzerData...

4 years ago | 1

| accepted

Answered
How to add a dashed line for values greater than a set threshold in contourf plot?
One option is to use hold and plot the threshold with a separate contour call — [X,Y,Z] = peaks; figure contourf(X,Y,Z, 'S...

4 years ago | 0

| accepted

Answered
How to set the grid line of y-axis by 5 ?
If you have R2018b or later, the easiest solution would likely be the xline and yline functions. x = 0:5; y = randi(40, size...

4 years ago | 0

Answered
Consildation of two program
I would duplicate them as function files with the appropriate input arguments and outputs, and then call them from a specifc scr...

4 years ago | 0

Answered
How to introduce a time-shift into data?
I cannot run the code (missing data), however the conversion from milliseconds (in this instance) to samples is straightforward ...

4 years ago | 0

| accepted

Answered
Plot deviation of curve as shaded area inside
I generally prefer patch to fill — x = transpose(1:100); y = x.^2; curve1 = y*1.05; curve2 = y*0.95; x2 = [x flipud(x)];...

4 years ago | 0

| accepted

Answered
exp doesn't return the expected values
That is esactly what it is doing — format longG x = [1 2 3; 4 5 6; 7 8 9]; y = exp(x) y11 = exp(1) y33 = exp(9) What ...

4 years ago | 0

| accepted

Answered
44.1 kHz Sample Rate
‘Could anyone please explain this phenomena regarding sinusoidal waves and filtering?’ Digital filters are designed to work w...

4 years ago | 1

Answered
How to add a value of a point on y axis in a PLOT ?
Possibly — point = [4, 2.5]; figure plot(point(1), point(2), 'or', 'MarkerFaceColor','r') axis([0 5 0 5]) hold on plot...

4 years ago | 0

Answered
How can i plot 3d scatter and equation plot in single figure?
UIse the hold function to plot them on the same axes — P=[4500 4550 5000 9050 14300 6000 7000 3000 13600 7500 4000 6400 8500 8...

4 years ago | 0

| accepted

Answered
Using System Identification Toolbox More Effectively
‘Because when we use low pass there will be a little phase shift and it can effect the transfer function of the system.’ You ...

4 years ago | 2

| accepted

Answered
Problem with solving a system of differential equations using ode45
I have no idea what the iniitial conditions are suposed to be. The oscillation might be the result of the if block defining ‘...

4 years ago | 2

| accepted

Answered
Presenting signal in different forms
The data do not appear to be exactly the same, so I am not certain how the values in the right plot were calculated from it. ...

4 years ago | 0

Answered
why this function is not plotting?
Look t the linspace result — a =5; T = 2E3; Z = linspace(0,0.1,0.01) U = (1+2.*Z)./(2.*a.*T); plot(Z,U) a =5; T = ...

4 years ago | 0

Answered
Move positive and negative y ticks in plot in alignment
Experiment with the TickLabelFormat property of the NumericRuler Properties. figure plot(1:10, randn(1,10)) ylim([-6.3 6....

4 years ago | 0

| accepted

Answered
Datatype duration midnight roll over
Unfortunately, duration values are limited to one day, and reset at midnight. There does not appear to be any workaround for th...

4 years ago | 1

Answered
Place coordinates in the plot legend
Perhaps — xv = 0:10:400; ym = rand(2,size(xv,2))*3500; x = 230; y = 95; figure plot(xv, ym) hold on plot(x, y, '^r') ...

4 years ago | 0

| accepted

Answered
How to know the slope and intercept of a straight line in a log log plot and how to connect the data in log log scale by a straight line?
The problem with doing regressions on logarithmic transformed variables is that they transform additive errors (that parameter e...

4 years ago | 0

Answered
How to Perform Fullwave Rectification?
Use the abs function.

4 years ago | 0

Answered
how to plot a circle in MATLAB with inner concentric circles?
Try something like this — rv = linspace(80, 40, 5); r = linspace(0, 5, 6); ac = linspace(0, 2*pi, 500); xc = r(:)*cos(ac); ...

4 years ago | 0

| accepted

Answered
How can I find the angle (from the vertical) between two points?
The atan2d function is likely more accurate — x1=2; x2=5; y1=2; y2=4; plot(x1,y1,'bo',x2,y2,'r*','MarkerSize',14) xlim(...

4 years ago | 0

| accepted

Answered
Coupled Second Order Differential Equations Solution
I am not certain what you are asking. If you want to convert one or more differential equations to a system of first-order diff...

4 years ago | 1

| accepted

Answered
How to find x values of specified y point on the graph ?
Using the supplied .fig file — F = openfig('graph1.fig'); Lines = findobj(gca, 'Type','line'); x = Lines.XData; y = Lines....

4 years ago | 0

Answered
Plot one data set with two different units?
I do not understand the problem with the code, since it appears to work correctly and apparently produces the result you want. ...

4 years ago | 0

| accepted

Answered
How do I add gaussian noise with mean=0 and var=0.5 to a signal?
F0=30; T=0:0.01:4.99; std= sqrt(0.5); noise = std.*randn(length(T),1); S=sin(2*pi*F0*T)+noise ...

4 years ago | 1

| accepted

Answered
Anyone know what the name of these striped graphs are and how to plot?
They appear to be something similar to what the contourf function would produce. See that documentation for details.

4 years ago | 1

| accepted

Answered
denoise signal with varied frequency range
I doubt that a frequency-selective filter would be possible for a time-varying frequency range. Experiment with the Savitzky-Go...

4 years ago | 0

Answered
How to erase a data point in plotting
There are several ways to do this, the most obvious being — x = 0 : 100: 1000; % Create Data ...

4 years ago | 0

Answered
Add equations to my polynomial fit on the graph
It is easier to use fprintf to print to the Command Window. I added a text call uinsg sprintf to demonstrate that option as wel...

4 years ago | 0

Answered
Don't know where my code is wrong and how to fix it
The integrated result remains symbolic because ‘x’ is symbolic. Example — syms t x x2 = t^3; F2 = sin(x); q = F2*diff(...

4 years ago | 0

Load more