Answered
Area fill under a curve
For the fill plot, use the data that fplot has already created — w = @(x) x.*exp(-x).*cos(x); hfp = fplot(w , [0,2*pi]); ...

5 years ago | 0

Answered
How can I transform these data in timetable?
I am not certain what you are asking. If you want to turn the first 3 variables into a dateime variable, this works — LD = ...

5 years ago | 0

| accepted

Answered
How to input a "sym" type equation into ODE45 to solve first order differential equation?
I do not understand what you are doing. However the correct way to use a symbolic different ia equation with the numeric solv...

5 years ago | 0

| accepted

Answered
Create 3D Surface-Shape of a 2D spline
Try something like this — x = linspace(-2.25, 0); y = 5-3.96*(x+1.125).^2; figure plot(x, y) grid [X,Y,Z] = cylinder(...

5 years ago | 1

| accepted

Answered
From numerical FFT to zero-pole diagram
What you can do depends on what the data are, one requirement being that to have complex vectors in the frequency domain. To ...

5 years ago | 0

| accepted

Answered
How can I make this line start from a specific date?
Change ‘Lv’ to: Lv = (DTv <= datetime('7-Jan-2020')) & (DTv >= datetime('14-Jan-2015')); and it should do what you want. ...

5 years ago | 0

| accepted

Answered
How can we use .Rds file in matlab for plotting purposes?
That apparently depends on the file. According to the description in readRDS, the file can either be ASCII or binary. It shoul...

5 years ago | 0

Answered
How make this curve bit smooth or how to reduce some spikes?
‘I to do it by applying some moving average filter or band pass filter, etc.?’ That depends entirely on the nature of the noi...

5 years ago | 0

| accepted

Answered
I would like to know how to find the slope for three different line in one graph
I have no idea what you want to do. Try this — V = [5 10 15]; I1 = [0.00487 0.00964 0.0145]; I2 = [0.00106 0.0021 0.00316...

5 years ago | 0

Answered
Trouble plotting data in table
‘How can I get the data to appear instead of the [1x12 double]?’ The ‘[1 x 12 double]’ is a row vector by definition. Fo...

5 years ago | 0

| accepted

Answered
plotting a function with different constant values without specifying the variable
I have no idea what range of values ‘v’ is supposed to have here, however ezsurf (or fsurf) may be appropriate — syms v T m ...

5 years ago | 0

| accepted

Answered
How to plot Normal probability density function?
Try something like this: RMS_vps = sort(RMS_vp); norm_vp = normpdf(RMS_vp,mx,sx); figure plot(RMS_vps, norm_vp) alternat...

5 years ago | 0

| accepted

Answered
Fitting sine curve to data
‘Is it possible to rearrange the code to get the equation I want?’ Yes, however it is not as good a fit as with the original ‘f...

5 years ago | 0

| accepted

Answered
Cole Cole Fitting to data
In electrical engineering terminology, , where is the frequency in Hz. I defined that way here. T1 = readtable('https://ww...

5 years ago | 0

| accepted

Answered
How can I plot this?
Try this (slightly edited version) — load('GIULIA_MMEQ1.mat'); A=GIULIAMMEQ1.Var4; B=str2double(A); NEW= B * 10 * 0.35; C=...

5 years ago | 0

| accepted

Answered
Subplots squish the images, what do I need to change?
‘Anyway, in the end I want to have one large image from the figure, where all the images are distributed in an undistorted way. ...

5 years ago | 0

| accepted

Answered
Plot Data Vs time
Try this — Info = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/727204/Full_Room_plot.xlsx'); Inf...

5 years ago | 0

| accepted

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

Load more