Answered
how can i apply lowpass filter to this code
There are several approaches. This one uses the lowpass function — % generate a waveform f0 =100; fs=1000; pw = 0.1...

4 years ago | 0

| accepted

Answered
Plotting the convolution of u(t) * dirac(t)
I am not certain what you are doing, however it is necessary to call the correct functions in order to evaluate them. Try this ...

4 years ago | 0

Answered
coordinates of a point in figure
Try this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1115885/26%20mm.xlsx') figure; ...

4 years ago | 1

| accepted

Answered
How to add small circles at the end of each line?
Try this — data = { 'col_1' 'col_2' 'col_3' 'col_4' 'col_5' 'col_6' 'col_7' '...

4 years ago | 0

| accepted

Answered
How to calculate the mean value of the non vero value in a vector?
M = [0.7,0.3,0]; Mmean = mean(M(M~=0))

4 years ago | 1

| accepted

Answered
Plotting of trend in subplots of scatter plot.
Use the lsline function — x=[ 1 2 3 4 5 6 7 8 9 10]; y1 =[ 10 20 30 45 57 78 80 90 100]; y2=[11 22 33 44 55 66 77 88 99 110]...

4 years ago | 0

| accepted

Answered
Failing in creating a surface from three array
Use one of the interpolation functions (here griddata) to create the ‘Z’ matrix — x=[0.5 ; 0.624; 0.75;0.874; 0.9;1.124]; y=[...

4 years ago | 0

| accepted

Answered
Plot points with different brightness
I am not certain what ‘brightness’ means, however there is a way to vary the transparency (alpha value) of points — x = 1:10; ...

4 years ago | 0

Answered
How to eliminate the for loop but end with the same result
Try something like this — A = -3:3; B = A.^3.*(A>0) It uses a version of ‘logical indexing’. .

4 years ago | 0

| accepted

Answered
Start and end date picker to load data to graph
The core MATLAB between function (R2014b+) may do what you want.

4 years ago | 0

Answered
How do I change the orientation and invert the Y-axis label of an Image plot?
The y-direction is 'reverse' in image plots, so to correct it: set(gca, 'YDir','normal') .

4 years ago | 0

| accepted

Answered
How average datetime data daily?
I would first transpose the data vector matrix, then use array2table to create a table with the data matrix, then use the addvar...

4 years ago | 0

| accepted

Answered
how to get the FFT of a pulse
I am not familiar with the ‘stepin’ function. It might be easier to use lsim for this, and design your own input vector or vect...

4 years ago | 0

Answered
Plotting 2 bode plots side-by-side
I am not certain what you want to do, however the subplot (or related) functions are likely the correct approach. The Control...

4 years ago | 0

Answered
How can I access and use fzero? Do I have to pay something, get a licence ... or?
The fzero function is a core MATLAB function, so no special Toolbox is required to use it. If you do not have MATLAB, you wou...

4 years ago | 0

| accepted

Answered
How to show value tends to infinity in plot
Try simething like this — x = linspace(0,10); y = 1./(x-5); figure plot(x, y, 'DisplayName','$C_{\phi}$') xline(5,'-r', ...

4 years ago | 0

| accepted

Answered
How can I change the input format of datetime in case that is not modifying.
Try this — C = {'04:07:06 30/06/0022' '04:36:51 30/06/0022' '04:37:03 30/06/0022' '08:16:22 30/06/0022' '08:16:52 30/06/...

4 years ago | 0

Answered
How to plot date on x-axis when it is retrieved as 'text' from table.
The readtable function imports it as a datetime array — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/upload...

4 years ago | 0

| accepted

Answered
I have the code for a decaying sinusoid and I want to figure out how to reverse it
I have no idea what ‘reverse’ means in this context. If you want to change ‘tt’ the easiest way is to re-code it as: tt = lin...

4 years ago | 0

Answered
How to calculate the small changes in a signal?
Iam not certain what result you want, however to get the smallest amplitude change, using gradient on the original signal is lik...

4 years ago | 0

| accepted

Answered
Remove parabolic or curved trend
Use the detrend function — LD = load(websave('y_data','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1112945/...

4 years ago | 0

| accepted

Answered
Remove a specific number of values prior and before a value based on a condition from the other column
I am not exactly certain what result you want, since ‘two values before and after are omitted’ seems not to conform with the exa...

4 years ago | 1

| accepted

Answered
Plot time series data
Try something like this — C = {'2022-08-27T00:00:00.019538' 16065 '2022-08-27T00:00:00.044538' 16871 '2022-08-27...

4 years ago | 0

Answered
Create a diagram with 3 polynomials
I am not certain wht you want with ‘logarithmic axes’ so this creates both as logarithmic — P1 = [ 1 -2 -15]; P2 = [1 -7 12];...

4 years ago | 0

| accepted

Answered
Can not envelope my data
Use the double function to conver the 16-bit integer data to double-precision floating point data.. You can change the double-...

4 years ago | 0

| accepted

Answered
How to calculate the peak-to-peak amplitude of a waveform?
Fortunately, there are complete P-T complexes in thei record, making the calculations easier. Detrending is important here in...

4 years ago | 0

| accepted

Answered
Only one graph appear instead of two.
Use the hold function — A1=14.895; B1=-3412.1; C1=-22.627; A2=14.751; B2=-3331.7; C2=-45.55; D=30:75; %temperature range...

4 years ago | 0

| accepted

Answered
Seperately extract 11th and 21st element of matrix A
MATLAB generally uses columnwise linear indexing, so: M = reshape((1:25).', 5, [])*10 V = M([11 21]) .

4 years ago | 0

| accepted

Answered
my fprintf statements keep repeting themself I just want it to be print one time
Provide numeric field designatoors for each element in the unit vectors (I added the square brackets, remove them if yoou don’t ...

4 years ago | 0

Answered
Resampling a binary data
The input vector has to be a real double array. So resample the real and imaginary parts separately. Doing the experiment — ...

4 years ago | 0

| accepted

Load more