Answered
The 'plotData' command does not plot the complete set of binary data
As ‘Udata4’ demonstrates, there are only 9 unique values. So all the points are plotted, however only 9 of them are different...

5 years ago | 0

Answered
MATLAB only display numeric values up to 4 decimal places. (MATLAB r2020a)
I cannot run thst. It appears that you are using the Symbolic Math Toolbox and the vpa funciton. Use the digits function to ...

5 years ago | 0

| accepted

Answered
Plotting for various values of the same parameter on the same plot
Set ‘S’ as a vector, add ‘S’ as an additional parameter to the ‘dYdX’ function, then iterate through the values of ‘S’. Try t...

5 years ago | 0

| accepted

Answered
datetime InputFormat error in R2021a but works in R2017b ?
That seems to have changed between releases. In R2021a, it’s necessary to use 'QQQ' to designate ‘long format’ quarters — b=s...

5 years ago | 1

| accepted

Answered
How to remove outliers and smooth the complex signals?
‘Does it make any sense to apply these filters on real and imag parts of a signal, say x, seperately and consider the new real(x...

5 years ago | 0

| accepted

Answered
function to call, code run but didnt print the value
The code does not actually call ‘my_fun1’. This version actually does — % x1=input('x1'); % x2=input('x2'); % x3=input(...

5 years ago | 0

Answered
How can I solve this problem while plotting?
I do not understand what you are doing. This call throws an error: plot(Years, limits_mtx,'g-^' ,'MarkerEdgeColor','k','Mar...

5 years ago | 0

| accepted

Answered
transfer function quality of Phase
Use the compare function instead to compare the original and estimated spectra. .

5 years ago | 0

| accepted

Answered
Resampler or interpolator for non-integer and non-uniform points
I am not certain what you are doing, or what your application is. The interp1 function is suitable for most problems, however...

5 years ago | 0

Answered
I am trying to find the full width at half max value and plot the waveform with markers
Explore the options of the Signal Processing Toolboox pulsewidth function. .

5 years ago | 0

| accepted

Answered
Why when I do the cumulative with retime, data don't change?
It does not change because the rows are already daily values, and the retime call summarizes the data by daily values. .

5 years ago | 0

| accepted

Answered
p value for two sets having variable x and y
The most appropriate measure might be the ranksum test if the experiments are unpaired (for example an intervention and control ...

5 years ago | 0

Answered
How can I do the cumulative?
The retime function is your friend foir this type of problem — LD = load('giulia_TT[1].mat'); giulia_TT = LD.giulia_TT RTd...

5 years ago | 0

| accepted

Answered
How Can I plot like this?
To plot two or more functions or data on a single axes, use the hold function. (There are other ways, however hold is likely th...

5 years ago | 0

Answered
Extract the intensity of a set of mass spectrum at a set of m/z locations
I have no idea what you are asking. I generelly use 'MinPeakProminence' instead of 'MinPeakHeight' to isolate important peaks...

5 years ago | 0

Answered
Indexing a column based on another column's values
One approach is to use ismember (or ismembertol for floating-point numbers) — a = [1,3,44,6,8,9,15]; b = [3, 8]; c = find(is...

5 years ago | 0

| accepted

Answered
Is there an efficient way to write a piecewise function ?
The condition statements wr.t. ‘t’ need to be revised slightly, and with that change, this works: t1 = 5; t2 = 7; t3 = 15; ...

5 years ago | 0

| accepted

Answered
Reading dates/times from a text file
That is not a straightforward as it would fitst appear. Try this — Time = '20210824_UTC_06:47:41' DT = datetime(Time, 'I...

5 years ago | 0

Answered
Highlighting different part of graph
The likely solution is to add an independent variable vector: x = 0:numel(signal)-1; % Independen...

5 years ago | 0

Answered
How can a differential equation be solved, if its constants are in a system of equation relation?
It is difficult to follow the posted code, so I am not certain what you are doing. If you want to pass those variables to ‘di...

5 years ago | 0

Answered
how to swap some vector value?
Use the reshape and circshift functions: S=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20] Sr = reshape(S,10,[]) Src ...

5 years ago | 1

Answered
Error in axis range
The axis call should go after the plot call: Jmax = 5; Tmax = 2; J = 0:Jmax; CT = rand(size(J)); CQ = rand(size(J)); CP =...

5 years ago | 1

Answered
FFT x-axis from samples to frequency
Try this instead — Y = fft(output,NFFT)/numel(output); F = (FS/2)*(0:NFFT/2-1); % Convert x-axis samples to Frequency S...

5 years ago | 0

Answered
ODE45 returns NaN values.
Adding: % Qt = [t>=min(t_array) t<=max(t_array)] to the ‘beam_function’ code demonstrates the problem. The ‘t’ value is alwa...

5 years ago | 0

| accepted

Answered
How to patch upperbound and lowerbound
Try something like this — T = table(datetime('now')+days(1:14).', rand(14,1), rand (14,1)+1, 'VariableNames',{'date','lowerbou...

5 years ago | 0

| accepted

Answered
How to solve this equation?
One approach — syms h(t) t Y Dh = diff(h); Eqn = 25*pi*Dh == pi*(4*0.0254)^2 * sqrt(2*9.8*h*2*(101325/876)+Dh^2)+90/3600 E...

5 years ago | 0

| accepted

Answered
Why am I getting "The value assigned to variable 'valid' might be unused"?
I did not run the code, however the second-to-last line assigns ‘valid’ as false: else disp('enter positive integers'), valid ...

5 years ago | 0

Answered
How can I find the Y value on an X–Y plot that corresponds to the tangent of the flattest part of a curve?
T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/718334/exampleData.txt') T1 = rmmissing(T1); ...

5 years ago | 0

| accepted

Answered
Cannot use any trigonometric functions
‘Execution of script sin as a function is not supported:’ You have a script (not a functions) named ‘sin.m’. Rename it to ...

5 years ago | 0

Answered
Dry electrode Raw Ecg Signal Processing
Without knowing the experimental set-up, it’s not possible to say. A pair of electrodes connected to an amplifier are prone to ...

5 years ago | 0

Load more