Answered
steady state responce of LTI system
Try this — A=[-0.0295 0.0478 0 -9.81;-0.1777 -1.4411 120 0;0.0005 -0.033 -1.5345 0;0 0 1 0] B=[0;-12.81;-6.59;0] C=[0 0 0 ...

5 years ago | 0

| accepted

Answered
How do I solve this error?
The value of ‘Ea’ in the exponential call makes the integral effectively zero of all the values of ‘V’. LD = load('V[1].mat...

5 years ago | 0

| accepted

Answered
adding each element of a matrix by previous elements of that row.
Try this — a = [1 2 3;4 5 6;7 8 9] acs = cumsum(a,2) b = acs ./ (1:size(a,2)) ratsb = rats(b) Experiment to get differ...

5 years ago | 1

| accepted

Answered
How do I only highlight the decreasing portion of the green in the plot with the find function?
The vector in the plot image (or the code to create it) are not available, so I substituted my own. This should get you star...

5 years ago | 0

Answered
Arrow of a vector ( r, theta) from a point (x,y).
One approach (using the quiver function) — x = rand y = rand r = rand theta = 30; ...

5 years ago | 2

| accepted

Answered
Label the actual data points in y-axis
One approach — x = linspace(0, 10, 5); yl = 250*(1-exp(-0.5*x)); [xr,yr] = stairs(x,yl/17); figure yyaxis left plot...

5 years ago | 1

| accepted

Answered
Creating a counter inside the ode45 function
See the ode45 documentation section on ODE with Time-Dependent Terms since that is most likely what you actually want to do. (I...

5 years ago | 0

Answered
How on earth to graph discrete time signals?
The only problems were in not using element-wise operations (use the ‘dot operator’ with the exponentiation an d multiplication ...

5 years ago | 0

| accepted

Answered
how to plot a contour plot with a csv file.
It depends what the data are. If they are a matrix of values, then use contour with the matrix. If they are random x and y v...

5 years ago | 0

Answered
Intersection between two functions
Try this slightly changed version of the existing code — f1=@(x) 2.2./sqrt(2*9.81*x); f2=@(x) tanh((3.5/(2*4.5))*sqrt(2*9.8...

5 years ago | 4

Answered
How do I plot a line against the y axis?
I am not certain what you want to do. Perhaps — x = linspace(0, 2*pi); y = sin(x); subplot(2,1,1) plot(x, y) grid yl...

5 years ago | 0

| accepted

Answered
How count a number of rows in a table (meteorologica data)?
I have no idea what you are actually doing. If you want to interpolate the rows in the table, consider converting it to a timet...

5 years ago | 0

| accepted

Answered
Extract data from cell array
Perhaps cell2mat would work. or alternatively, adding square brackets to concatenate the cell contents: L1 = [B{1,1}] L2 = [B...

5 years ago | 0

Answered
Replacing for loop in the function
See if ‘func2’ (without the loop) does what you want. f = @(x) exp(-0.1*x) .* sin(2*pi*x); a = -5; b = 5; n = 10; I...

5 years ago | 1

| accepted

Answered
exponential curve fit coefficients
Linearising it by log-transforming the data is not appropriate, because that distorts the errors, making them multiplicative rat...

5 years ago | 1

Answered
How can I extract sub tables with unequally numbers of rows from main Table? Using loop or one code.
If you have specific criteria for how you want to extract the sub-tables, use logical indexing to extract specific rows. The ro...

5 years ago | 1

| accepted

Answered
why PSI values are diffrent when nlmefit using ode45 solver compared to when it uses analytical solution?
From the description, it appears that the code is attempting to fit data to the solution of a differential equation, or a system...

5 years ago | 0

| accepted

Answered
How to plot XRD data as 3D plot?
When I click on the link, I get a ‘DOI Not Found’ error. (EDIT — The new link is to an article behind a paywall, so I do not ha...

5 years ago | 1

| accepted

Answered
Struggling with solving a systems of equations
Try this — syms a_273 a_233 p_233 p_273 T_0 = 273; T_1 = 233; a_273 = 4.29E-3; p_233 = p_273 * (1 + a_273*(T_1 - T_0)) p_...

5 years ago | 0

Answered
Why I cannot get accurate curves using for loops?
It is not possible for me to run the posted code. With respect to the plots, perhaps using semilogx would work (instead of pl...

5 years ago | 0

Answered
How to calculate for significant difference between Cohen's Kappa values?
I used Cohen’s many years ago. From my understanding, from reading Fliess’s book (and correspoinding with him), Cohen’s is no...

5 years ago | 0

Answered
Assigning variable names to eigenvalues
Just subscript the original vector to refer to them individually — format long G A = [1 2 3; 1 2 3; 1 2 3]; L = eig(A) fo...

5 years ago | 0

Answered
Can someone explain why I am getting the error "Not enough input arguments (line 2)"?
I suspect it is because ‘xvar’ and ‘yvar’ are not passed as parameters to ‘mysvmfun’. It probably needs to be something like ...

5 years ago | 0

Answered
use function with user defined variable in GA
I have no idea what the fitness funciton does, however if it uses data from the Excel file, read the file once and then pass the...

5 years ago | 0

| accepted

Answered
Using barh to plot top 10 values in Feature Selection
I have no idea what the data are, however the maxk function could do what you want. .

5 years ago | 1

| accepted

Answered
How can i select rows in a timetable?
One option is to convert ‘T_T’ to a duration array, so timerange would work with it. Another option is to use logical indexin...

5 years ago | 0

| accepted

Answered
How to convert symbolic array into a vector
I am not certain what you want to do, or the specific problem. It might be easiest to create the ‘L’ assignment as a function...

5 years ago | 0

| accepted

Answered
How can I run two loops at a time?
Apparently, that occurs when ‘ILP’ and ‘QLP’ become matrices rather than scalars, so when either ‘i’ or ‘j’ is greater than 1. ...

5 years ago | 0

Answered
How to discretize non-uniformally a curve
One option is the stairs function — x = linspace(0, 400,50); y = [exp(x/100); sin(x/100)-x/400]; figure plot(x, y) gri...

5 years ago | 0

| accepted

Answered
Area under distribution fit curve
It would help to know the function used to fit the curve (for example nlinfit). The nonlinear curve-fitting functions require...

5 years ago | 0

| accepted

Load more