Answered
Bifurcation Diagram will not graph
Plot the points — figure; ax(1) = axes; hold on xlabel ('k'); ylabel ('C'); xlim([-2 2]); ylim(...

5 years ago | 0

Answered
How do ı convert rad/sample to Hz?
Note that radians/sample is equivalent to the Nyquist frequency, one-half of the sampling frequency. In fvtool, click on the...

5 years ago | 1

| accepted

Answered
How to filter a signal with a transfer function?
The easiest approach is to first let the Control System Toolbox solve it, then realise it as a discrete filter using the numerat...

5 years ago | 0

| accepted

Answered
Vertical and horizontal line standard equations
The problem is that the axes are set to be limited to [0 1] while the lines are all negative. (The second line was originally c...

5 years ago | 0

| accepted

Answered
Matlab contour plot with color
Use the contourf function, and choose the colormap that most closely represents what you want (for shades-of-gray, the gray colo...

5 years ago | 0

Answered
plot 3D function
I have no idea what ‘plotn’ is. That aside, ‘X’, ‘Y’, and ‘u’ are all (40x40x40) matrices. To plot them as a mesh for exampl...

5 years ago | 0

| accepted

Answered
problem with the function y
Define it as a function. (This has been possible since R2012a.) syms x T(x) = taylor (asinh (x), x, 'Order' ,16); figure...

5 years ago | 1

| accepted

Answered
Issues with my Bifurcation Diagram
One problem is that ‘ax(1)’ does not have anything assigned to it, at least in the posted code. Fixing that makes the axes magi...

5 years ago | 0

Answered
read Barcode is showing error- Undefined function or variable 'readBarcode'.
According to the documentation, the readBarcode function was introduced in R2020a. The version posted is R2019a, so to use it...

5 years ago | 2

Answered
Quiver is not working about drawing vector field.
It appears to work correctly here — x = linspace(-2, 2, 40); y = linspace(-2, 2, 40); [X,Y] = meshgrid(x,y); Z = (x.^2 + Y....

5 years ago | 0

Answered
Invalid expression on using log(t) and [exp(t) * cos(t)] functions
There are too many parentheses in ‘V’. Also, it is necessary to use element-wise operations in the vector calculations. See ...

5 years ago | 0

| accepted

Answered
scatterplot with the datetime
One approach — Uz = unzip('https://www.mathworks.com/matlabcentral/answers/uploaded_files/630240/household_power_consumption_2...

5 years ago | 2

| accepted

Answered
X-ray diffraction (XRD) Base line removal
See if the detrend function will do what you want. (This appears to be a relatively straightforward application of it.) More ...

5 years ago | 7

| accepted

Answered
How do I detect the desired peaks
‘There are multiple data points between the peaks, so finding two maximas would not work.’ It would definitely help to have a...

5 years ago | 0

| accepted

Answered
Using datenum to calculate acceleration
I’m not certain that I understand in detail what you’re doing. Using datenum is likely the best option here. I experimented ...

5 years ago | 0

Answered
How to prevent readtable excluding rows with "NA"?
Try this — C1 = readcell('https://www.mathworks.com/matlabcentral/answers/uploaded_files/629630/exampletxt.txt'); VN = C1(1,:...

5 years ago | 0

| accepted

Answered
inverse of tan at 90 degree
A more robust approach would be atan2d, since it provides a 4-quadrant angle. y2 = 20; y1 = 10; x2 = 42; x1 = 42; The...

5 years ago | 0

Answered
PLEASE I NEED YOUR ASSISTANCE
I am not exactly certain what you want. Try this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded...

5 years ago | 0

Answered
Empty sym: 0-by-1
Exploring the function is often worthwhile. It apparently has a real root at about -0.45, so share that information with vpasol...

5 years ago | 0

| accepted

Answered
How to recode the strings() function?
The string data type is new to R2016b. A possible workaround could be the cellstr function (introduced prior to R2006a). E...

5 years ago | 1

Answered
How to preserve apostrophe sign in a string in Matlab?
Enclose the apostrophes in apostrophes — x = 'La drôle de tête du râteau est posée contre le mûr près de l''''abîme'; sprintf...

5 years ago | 0

Answered
How do I plot 3d graph ?
Interpolate! N = 50; xv = linspace(min(x), max(x), N); yv = linspace(min(y),m max(y), N); [Xm,Ym] = ndgrid(xv, yv); Zm = ...

5 years ago | 0

Answered
Vectors -Must- be the same length
Change the for loop to: for it=2:itmax dSodt(it)=-r*S(it-1)*I(it-1); S(it)=S(it-1)+dSodt(it)*dt; dRodt(it)=a*I(...

5 years ago | 0

Answered
Transfer character string from sprintf to subtitle
To print a single ‘\’ using sprintf (and the others, like fprintf and compose), use a double backslant ‘\\’. So: i = 1; Q ...

5 years ago | 0

| accepted

Answered
How to approximate a staircase signal into a linear signal?
There are several options, the most obvious being lowpass filtering. One straightforward way to do that iws with the movmean ...

5 years ago | 0

Answered
How to find the time of the max peak in a signal?
The easiest way is to have findpeaks return the indices in the second output — t = ...; ...

5 years ago | 1

| accepted

Answered
Simple question, how can I plot this tan x function?
Perhaps — x = @(y) tan(y) figure fplot(x, [-pi pi]) grid xticks([-pi -pi/2 0 pi/2 pi]) set(gca, 'XTickLabel',{'$-\pi$',...

5 years ago | 1

| accepted

Answered
Finding x and y values from certain values of y = 0, x = 0, ymax and xmax from a plot
One option is to model it as described in how to find ascending and descending of hysteresis loop?, then use the model result to...

5 years ago | 0

| accepted

Answered
Synchronize sensor data from multiple sensors
If the first columns are not actulal times, as would otherwise be used with datetime or duration, just interpolate. Consideri...

5 years ago | 1

| accepted

Answered
Why is command window printing out all the code?
The echo function may have become activated somehow. See if: echo off solves it. .

5 years ago | 0

| accepted

Load more