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

Answered
How to get 10000 variable numbers between the range of 0 and 100?
If you want the numers to be between and , use the logspace function, then use randperm to randomise them — varx = logspace(...

4 years ago | 0

| accepted

Answered
How to plot dotted line drawings with imaginary number data?
I am not certain either, since I have no idea what the data mean, Here are two possible apporoaches — M = [1 69 -0.22438-0....

4 years ago | 0

| accepted

Answered
How to "automatically" show an equation, written in the matlab editor, as a text on a plot
I apologise for the delay. Re-posting — syms x % x = 1 : 10 ; a = 0.5 ; y = exp(-a*x); % equation to show inside the plo...

4 years ago | 1

| accepted

Answered
2d extrapolation to replace NaN in corners
The fillmissing function may do what you want. Try something like this — M = NaN(5); M([3 (7:9) 11:15 (7:9)+10 23]) = ra...

4 years ago | 1

Answered
How can i calculate the length of curve?
Possibly — X=[96.0741000000000,97.1940000000000,98.3139000000000,99.4338000000000,100.553700000000,101.673600000000,102.793500...

4 years ago | 1

Answered
Accessing alternate rows and columns in the matrix.
Try this — A = [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15...

4 years ago | 0

| accepted

Answered
Extract specific X & Y data from Contour curve
Try this — %% Input Parameters for Earth Ctheta = 5; Cphi = 0.001; phimax = deg2rad(58); thetamax...

4 years ago | 0

| accepted

Answered
Can't assign VariableUnits to TimeTable
For some reason, it doesn’t like 'VariableUnits' as part of the initial timetable declaration. This alternative approach wor...

4 years ago | 0

| accepted

Answered
Adding values to a cell array in a loop for wav files
Save it to a cell array instead — peaks{i} = [pks freq] That should work, since the two vectors being cncatenated will have t...

4 years ago | 0

Answered
Matlab forgets userpath setting after crash
‘Can it be fixed?’ Probably. Use a startup file. Create it and then put it in the main ...\Documents\MATLAB directory.

4 years ago | 0

Answered
How to plot using STACKEDPLOT in MATLAB
The core MATLAB version of stackedplot was introduced in R2018b. The posted plot image seems to be more like a waterfall or rib...

4 years ago | 0

Answered
Displaying exponential notation with num2str?
I wrote a little utility program to do that sort of thing a few years ago. Try this — Q1 = [-pi*1000; 0; pi*100]; expstr =...

4 years ago | 1

| accepted

Answered
Matlab read .csv file together with headlines and operations on matrix elements?
The readtable function call may be in error if you want to import the variable names, however I don’t know from the code what yo...

4 years ago | 0

| accepted

Load more