Answered

Taking middle 4 values of n size array

You could use something like, for an array A n = length(A(:)) % : treats as column even if this is actually a multidimensional ...

Taking middle 4 values of n size array

You could use something like, for an array A n = length(A(:)) % : treats as column even if this is actually a multidimensional ...

17 hours ago | 0

Answered

Program for Impulsive Difference Equations

One way to approach this is to transform your difference equation in the single variable y to a system of two difference equatio...

Program for Impulsive Difference Equations

One way to approach this is to transform your difference equation in the single variable y to a system of two difference equatio...

1 day ago | 0

Answered

How should i go about solving a set of ODEs for a set of data points? I would like to automate it as much as possible.

Please see my earlier comments. From the behavior you describe, it looks like Sol1 and SolRequired are returned empty from wha...

How should i go about solving a set of ODEs for a set of data points? I would like to automate it as much as possible.

Please see my earlier comments. From the behavior you describe, it looks like Sol1 and SolRequired are returned empty from wha...

2 days ago | 0

| accepted

Answered

How should i go about solving a set of ODEs for a set of data points? I would like to automate it as much as possible.

I am not clear on the details of your implementation. It would take some time to go through it all line by line. In case it is ...

How should i go about solving a set of ODEs for a set of data points? I would like to automate it as much as possible.

I am not clear on the details of your implementation. It would take some time to go through it all line by line. In case it is ...

2 days ago | 1

Answered

How to differentiate elements in a matrix by each other

Say your matrix is called M, you could do something like % find incremental change from one row to the next delta = diff(M); ...

How to differentiate elements in a matrix by each other

Say your matrix is called M, you could do something like % find incremental change from one row to the next delta = diff(M); ...

2 days ago | 1

| accepted

Answered

How to organize a table?

You could do this with a simple loop I'll assume your table is called mytable % find maximum possible value for cell type cell...

How to organize a table?

You could do this with a simple loop I'll assume your table is called mytable % find maximum possible value for cell type cell...

5 days ago | 0

| accepted

Answered

concatenating and comparing two datsets

Assuming that the 9th column of both data sets is the same, I think you can do this just with an innerjoin tbl1 = readtable('da...

concatenating and comparing two datsets

Assuming that the 9th column of both data sets is the same, I think you can do this just with an innerjoin tbl1 = readtable('da...

5 days ago | 1

| accepted

Answered

I want to add a line of best fit to my plot using the polyfit function.

You can do something like this p = polyfit(xL(A),anglex,1); anglexFit = polyval(p,xL(A)); plot(xL(A),anglex,'ko',xL(A),anglex...

I want to add a line of best fit to my plot using the polyfit function.

You can do something like this p = polyfit(xL(A),anglex,1); anglexFit = polyval(p,xL(A)); plot(xL(A),anglex,'ko',xL(A),anglex...

6 days ago | 0

Answered

open loop response for nonlinear system

Basically you need to define the set of ODE's (ordinary differential equations) that define your system and then solve them. MAT...

open loop response for nonlinear system

Basically you need to define the set of ODE's (ordinary differential equations) that define your system and then solve them. MAT...

7 days ago | 0

| accepted

Answered

How to implement a frequency dependent analysis?

You are quite close with your code. I think you just need to use the semilogx with a few annotations as shown below %Schirmdämp...

How to implement a frequency dependent analysis?

You are quite close with your code. I think you just need to use the semilogx with a few annotations as shown below %Schirmdämp...

7 days ago | 0

| accepted

Answered

How do I plot a 3D mesh from multiple csv files?

The problem apparently is with loading the files, nothing to do with plotting 3d mesh, or at least it didn't get far enough to h...

How do I plot a 3D mesh from multiple csv files?

The problem apparently is with loading the files, nothing to do with plotting 3d mesh, or at least it didn't get far enough to h...

8 days ago | 0

| accepted

Answered

Insert missing date and corresponding values in a matrix?

I'm not completely clear on what it is you are trying to do, but I think you want to plot the values in the third column against...

Insert missing date and corresponding values in a matrix?

I'm not completely clear on what it is you are trying to do, but I think you want to plot the values in the third column against...

9 days ago | 0

Answered

how to call nested structure and cell array?

I'm not sure exactly what you mean by "call the first column of the data.timepoints" If you wanted to assign some other variabl...

how to call nested structure and cell array?

I'm not sure exactly what you mean by "call the first column of the data.timepoints" If you wanted to assign some other variabl...

12 days ago | 0

| accepted

Answered

How can I graph arrays with negative exponentials? It keeps saying that there is an error but I can not figure out what is wrong

You need to put a multiplication operator between the constants and the exponents f(x)=[6.02105*exp(-6,) 1.514423*exp(-3), 6.64...

How can I graph arrays with negative exponentials? It keeps saying that there is an error but I can not figure out what is wrong

You need to put a multiplication operator between the constants and the exponents f(x)=[6.02105*exp(-6,) 1.514423*exp(-3), 6.64...

12 days ago | 0

Answered

Extrapolation of data points

You could first find the equation of a straight line that goes through the last n points of one curve, and then similarly find a...

Extrapolation of data points

You could first find the equation of a straight line that goes through the last n points of one curve, and then similarly find a...

12 days ago | 0

Answered

Creating a Matrix from Distances between Vectors

So from your description you actually want to find and store the vectors that go from each point in the first matix to each poin...

Creating a Matrix from Distances between Vectors

So from your description you actually want to find and store the vectors that go from each point in the first matix to each poin...

13 days ago | 0

Answered

Rotation of curve question

I think you also have a sign error in your formula. Xr = (x-XXc)*cos(delta) + (yp-YYc)*sin(delta) + XXc; % should be Xr = (...

Rotation of curve question

I think you also have a sign error in your formula. Xr = (x-XXc)*cos(delta) + (yp-YYc)*sin(delta) + XXc; % should be Xr = (...

13 days ago | 0

Question

How to vectorize assignment from array of structures to cell array

I am looking for a way to make an assignment from an array of structures to a cell array without using a loop. Here is an examp...

15 days ago | 1 answer | 0

Answered

Help with discrete convolution

This is a good reference that explains discrete convolution specifically using MATLABhttps://www.ling.upenn.edu/courses/cogs501/...

Help with discrete convolution

This is a good reference that explains discrete convolution specifically using MATLABhttps://www.ling.upenn.edu/courses/cogs501/...

15 days ago | 0

| accepted

Answered

could anyone help me to solve the issue

If I am understanding your problem correctly you could do something like this: % define matrix of value A=[0.0037 0.0036 ...

could anyone help me to solve the issue

If I am understanding your problem correctly you could do something like this: % define matrix of value A=[0.0037 0.0036 ...

16 days ago | 0

| accepted

Answered

Issue with array2timetable = Row times must be datetime or duration vector with one time for each row in input timetable.

It looks like you may have the arguments reversed. The first argument should be the data (doubles) the last argument should be t...

Issue with array2timetable = Row times must be datetime or duration vector with one time for each row in input timetable.

It looks like you may have the arguments reversed. The first argument should be the data (doubles) the last argument should be t...

16 days ago | 0

Answered

Help with discrete convolution

You need to first form two vectors, z1 and z2 where z1 hold the values of your first series, and z2 holds the values of your sec...

Help with discrete convolution

You need to first form two vectors, z1 and z2 where z1 hold the values of your first series, and z2 holds the values of your sec...

16 days ago | 0

Answered

how to use logic array

It isn't quite clear the specifics of what you want to retrieve but for example if you wanted to get the row in frame 1 that mat...

how to use logic array

It isn't quite clear the specifics of what you want to retrieve but for example if you wanted to get the row in frame 1 that mat...

20 days ago | 1

| accepted

Answered

How to do Downward peak detection?

You can use the MATLAB function islocalmin for example idx = 1:length(A) isMin = islocalmin(A); plot(idx,A,idx(isMin),A(isMin...

How to do Downward peak detection?

You can use the MATLAB function islocalmin for example idx = 1:length(A) isMin = islocalmin(A); plot(idx,A,idx(isMin),A(isMin...

21 days ago | 0

Answered

Problem of Nonlinear Regression

If you have the Statistics and Machine learning toolbox you can use fitnlm or nlinfit see documentation https://www.mathworks.co...

Problem of Nonlinear Regression

If you have the Statistics and Machine learning toolbox you can use fitnlm or nlinfit see documentation https://www.mathworks.co...

21 days ago | 0

Answered

How to compare array's values with each other?

Staying close to what you have started here, you could put your code into a double loop, for example % assign threshold z = 10...

How to compare array's values with each other?

Staying close to what you have started here, you could put your code into a double loop, for example % assign threshold z = 10...

21 days ago | 1

Answered

Help deal with the loop

You do not need a loop to evaluate this type of expression in MATLAB. The beauty of MATLAB is it lets you do math directly with ...

Help deal with the loop

You do not need a loop to evaluate this type of expression in MATLAB. The beauty of MATLAB is it lets you do math directly with ...

22 days ago | 0

Answered

Which Matlab tools suit for substance manipulation and energy flow simulation?

The Mathworks Simulink program, is a very flexible, and powerful, block diagram oriented tool for simulating systems that can ...

Which Matlab tools suit for substance manipulation and energy flow simulation?

The Mathworks Simulink program, is a very flexible, and powerful, block diagram oriented tool for simulating systems that can ...

22 days ago | 0

Answered

Is it possible to run a function that requires input variables when they are declared later in the function?

You just need to give your first function a return argument when you call it. So the definition of your first function should...

Is it possible to run a function that requires input variables when they are declared later in the function?

You just need to give your first function a return argument when you call it. So the definition of your first function should...

26 days ago | 0

Answered

Delete rows with bad data and surrounding rows

Here's another approach % script to clean data B = [0 1 0 0 1 0 1; 0 0 0 0 0 0 0; 0 1 0 0 1 0 1; 0 1 0 0 0 1 ...

Delete rows with bad data and surrounding rows

Here's another approach % script to clean data B = [0 1 0 0 1 0 1; 0 0 0 0 0 0 0; 0 1 0 0 1 0 1; 0 1 0 0 0 1 ...

26 days ago | 0

| accepted