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

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

Load more