Answered
How do I find a daily minimum value using retime when I have categorial data in the table?
My impression is that ‘TT1’ should have all the other information as well. If it does not, post the data (or a representative...

5 years ago | 0

| accepted

Answered
Plot a table and generate legend from values from the table
Try this — imported = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/726854/raw_data.xlsx'); l...

5 years ago | 0

| accepted

Answered
How do I retrieve data from multiple different days using a for loop?
I have no idea what the data are (and there could be ways to make this more efficient). Making a few assumptins, I would crea...

5 years ago | 0

Answered
How to put the legend in a subplot?
One approach — x = 1:10; y = rand(11,10); NrSbp = size(y,1); figure for k = 1:NrSbp subplot(6,2,k) plot(x, y(k...

5 years ago | 0

Answered
How to get raw Electromyography (EMG) of Normal and Abnormal data sets
One source is the PhysioBank ATM. Scroll down the Database list until you find some. Most are EKG records, however ‘Examples o...

5 years ago | 0

| accepted

Answered
times function for argument of type cell?
It is necessary to include the cell array as an argument to cellfun: C = num2cell(randi(9,4, 5)) percentages = cellfun(@(x)ti...

5 years ago | 0

| accepted

Answered
Solve one function in terms of another
Use isolate instead of solve in this instance — syms x(t) y(t) t eq=x+2*y==10; soln = isolate(eq,y) LHS = lhs(soln) RHS = ...

5 years ago | 1

| accepted

Answered
How to set up variable with only several states in the genetic algorithm
See the documentation section on Minimize a Nonlinear Function with Integer Constraints and then set the bounds on ‘x(2)’ and ‘x...

5 years ago | 1

Answered
How to automate small increments in function for Genetic Algorithm ?
I am not certain what you want to do. It would certainly be appropriate to put the ga call in a loop and have the function pa...

5 years ago | 0

| accepted

Answered
Isolate the linear segment of data/graph
One reasonably straightforward way to determine the slope of a curve is to use the gradient function. For example, the gradie...

5 years ago | 0

| accepted

Answered
How do I define an integral function (in the calculus sense) so that the argument of the function is the integration boundary?
Either use a loop or arrayfun. Thje loop is straightforward, so I will not demonstrate it here. This approach uses arrayfun: ...

5 years ago | 0

| accepted

Answered
how to get Y Value from a plot having 3 curves as shown in figure?
Try something like this — x = linspace(0, 5); C1 = 5+(x-2).^2; C2 = 2+(x-1).^4; xint = interp1(C1-C2, x, 0) yint = inter...

5 years ago | 0

| accepted

Answered
Coefficient estimation for a system of coupled ODEs
I do not see that you are doing anything wrong, and the code runs without error. The changes I made were to estimate the init...

5 years ago | 0

| accepted

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

Load more