Answered
I want to see the text & strings in a single line of Xlabel
Try this: timeseries = ['2019-09-04T14:53:20';'2019-09-04T15:10:00']; % Create Array xlabel(sprintf("Time...

5 years ago | 2

| accepted

Answered
Signal flatline detection?
One option is to use the islocalmin (or related islocalmax) funciton, and set 'FlatSelection' to 'first'.

5 years ago | 0

| accepted

Answered
Array indices must be positive integers or logical values.
The code runs for me without error and creates a neat Lissajou figure with red and blue circles traversing the path! The prob...

5 years ago | 1

| accepted

Answered
Tanh graph with ±
That is an annotation textbox, specifically the result of Create Text Box Annotation with Multiline Text in MATLAB. You can t...

5 years ago | 0

| accepted

Answered
How I can use notch filter
To subtract the frequency at (0,0) (essentially the D-C or constant offset), subtract the mean of the grayscale image from the i...

5 years ago | 0

Answered
Plotting Area of a function
I am not sure what you want. Try this: fun = @(x) (x.^2 + 2) q = integral(fun,-1,2) xv = linspace(-2,3); xseg = xv(x...

5 years ago | 0

| accepted

Answered
How to put a variable in transfer function num and den?
You are mixing Control System Toolbox and Symbolic Math Toolbox funcitons and syntax. You cannot do that! Try this instead...

5 years ago | 0

Answered
label on the plot
Two options: xlabel('A_z^{-1/4} (ba)^{-1/4}') or: xlabel('$A_z^{-\frac{1}{4}} (ba)^{-\frac{1}{4}}$', 'Interpreter','latex...

5 years ago | 0

| accepted

Answered
How to find the TF of a House Heating System. (New and I need help)
This is actually easier to do by hand: syms C Tin(t) Win k Tout(t) s H(s) Eqn = C*diff(Tin) == Win - k*(Tin - Tout) LEqn = ...

5 years ago | 0

| accepted

Answered
zpk function is missing
In the Signal Processing Toolbox, the [z,p,k] output is optional for several filter design functions. Use those with (for examp...

5 years ago | 0

Answered
getting equation from 5 datas
There are several options, one being mldivide,\ and another being polyfit (and polyval). There are others as well.

5 years ago | 0

Answered
Acceleration factor for cyclic temperature ALTJ
Use exp instead of e^. The rest is essentially as you wrote it (except for the square brackets that are not necessary and shoul...

5 years ago | 0

| accepted

Answered
Finding 3 largest values in a matrix
If you have R2017b or later, the maxk function will likely be useful.

5 years ago | 2

| accepted

Answered
How can I use levenberg-marquardt algorithm with two variables
It will be necessary to parameterize the ‘k’ constants (that you want to estimate) as: k1 = p(1) k2 = p(2) k3 = p(3) If the...

5 years ago | 0

| accepted

Answered
How to integrate below a curve and between multiple vertical lines?
I would use cumtrapz instead of trapz. The cumtrapz function will give incremental areas as a function of the independent var...

5 years ago | 0

Answered
Averages using intervals in a vector
I have not certain idea what you are asking. One option is to use the movmean function. Another option: v = rand(2500,1)...

5 years ago | 0

| accepted

Answered
Plot xyz point data to 3D contour
Try this: D = readmatrix('data.txt'); x = D(~(any(isnan(D),2)),1); y = D(~(any(isnan(D),2)),2); z = D(~(any(isnan(D),2)),...

5 years ago | 0

| accepted

Answered
Solve command output help
Use the vpa funciton to get a numeric (decimal fraction) result. For example — x = vpa(x) .

5 years ago | 1

Answered
subplots of histograms for multiple matfiles
See: Process a Sequence of Files Unless I am missing some details, this should be straightforward. Read them, then calculat...

5 years ago | 1

Answered
Table of values from output
Perhaps something like this: xv = nan(MaxIter,1); yv = xv; for i = 1:maxIter [f,j] = newtraph(x); x = x- j\f; ...

5 years ago | 0

| accepted

Answered
Specify datenum starting value
It will be necessary to combine the dates with the time values in order to do what you want. In most instances, this is relativ...

5 years ago | 0

| accepted

Answered
Code for calculating Work Exergy of a Closed System (Piston Cylinder)
One approach: P0 = 760; % Create Data dVda = @(a) (8E-4)*sin(a)...

5 years ago | 0

Answered
How to plot a 2nd Yaxis on a 2D plot
If you have R2016a or later, use the yyaxis function. For earlier versions, use plotyy.

5 years ago | 0

Answered
Plot a point of intersection between 2 lines or curves
Try this: x = [1 2 3 4 5]; y1 = [2 4 6 8 10]; y2 = [4.2 5 5.8 6.1 7.2]; x_int = interp1(y1-y2, x, 0); ...

5 years ago | 1

| accepted

Answered
fit the y=mx+c in time series
That could be a challenge. One option is to use mldivide,\: dt = datetime('now')+days(1:10); T1 = table(dt(:), rand(10,1)+...

5 years ago | 0

Answered
how to calculate a function for different values of k?
Try this: syms k a = 0.5; T = 20; assume(k>0) s = a+(k*pi*i/T); f1 = s/(s^2+1)^2; f2 = simplify(rewrite(real(f1), 'ex...

5 years ago | 0

| accepted

Answered
Adding each values to row vector
One option is the deal function: [a,b,c] = deal(1,2,3) producing: a = 1 b = 2 c = 3 .

5 years ago | 0

| accepted

Answered
Unrecognized function or variable 'movcorr'
Download movcorr from the File Exchange. Put it somewhere in your MATLAB user path. Do not put it anywhere else. See What I...

5 years ago | 0

Answered
Least_mean Squares
To make your code simpler and more efficient use the sum and mean functions. You can likely avoid the (explicit) loops. Sinc...

5 years ago | 0

Answered
How can I estimate parameters of an ODE
It would help to have more information, as well as the data (or a representative sample of it). For most problems, this is rela...

5 years ago | 0

| accepted

Load more