Answered
calculate rotation matrix in 3D
I'll assume that we make the reference frame right-handed by negating the axis_3 vector such that axis_1 = [2.7239 -0.2014 -...

7 meses ago | 1

| accepted

Answered
Translational motion of a rotating object.
To begin, Chasles' theorem states that translational motion and rotational motion obey the law of superposition. Therefore, you...

7 meses ago | 0

Answered
change variable value based on other variable in if loop
Your input command is requesting a string input: in1 = input('first: ','s'); in2 = input('second: ','s'); This results in in1...

8 meses ago | 1

| accepted

Answered
I don't know the problem involved Backward difference.
I am assuming that your question is that you don't understand Simpson's rule. Below is an exerpt from Wikipedia: Simoson'...

8 meses ago | 0

| accepted

Answered
1-2-1 or X-Y-X rotation matrix not supported
I recently cataloged all of the permutations of the 2 and 3 axis planar rotations. It is easy to write your own functions. See...

8 meses ago | 0

Answered
Extracting data from simout MATLAB work space
simout is a timeseries structure. I like to extract separate vectors from the structure, for example: t = timout.time(simout.t...

8 meses ago | 0

| accepted

Answered
Where can I publish Matlab-compiled software?
If you want to share the source code, you can post it on Matlab File Exchange

8 meses ago | 0

| accepted

Answered
In my Simulink model I would like to conditionally write output data to selectable .mat files in different relative directories.
This sounds like a rather sophisticated way of constructing output. I'm not sure if that is easily acomplished with the "to fil...

8 meses ago | 0

| accepted

Answered
minimum feret diameter of particle
https://blogs.mathworks.com/steve/2018/02/20/minimum-feret-diameter/?s_tid=answers_rc2-1_p4_MLT

8 meses ago | 0

Answered
Vlookup equivalent function for matlab
If your data is in a 2D table (matrix) and you want to locate a column that matches the exact value from another column, then lo...

8 meses ago | 0

| accepted

Answered
How calculate the second and third numerical derivative of one variable f(x)
The Matlab "diff" function is basically the Backward difference formula. There are much more accurate ways to compute numerical...

8 meses ago | 0

Answered
Runge kutta order 2 by hand
In the statement Y(1) = [t(1);y(1)] the simi-colon ";" indicates you are attempting to put 2 rows of numbers into a single ro...

8 meses ago | 0

Answered
Correct way to detect Zero crossing
A thought you might want to consider: if you multiply the current value, y(i) by the previous value y(i-1), this product is on...

8 meses ago | 1

Answered
How to add optional outport to simulink model?
You can use a switch to select between the two different output options that you want, and there are a number of ways to activat...

8 meses ago | 0

| accepted

Answered
Ralston's method function
There is an error in your function in the k2 term. For Ralstons method, it should be: k1 = h*f(t(i), y(i)); k2 = h*( f( t(i) ...

8 meses ago | 0

Answered
First and Second Order Central Difference
For starters, the formula given for the first derivative is the FORWARD difference formula, not a CENTRAL difference. (here, ...

8 meses ago | 0

| accepted

Answered
How can I integral Acceleration-time data to Velocity with removing drift?
It seems that what you are asking cannot be done. More information is needed. In order to remove an error in the data, you nee...

8 meses ago | 1

Answered
circle with three points
Try this.

9 meses ago | 0

Answered
Unit step function explanation
Double is simply the data type , i.e. double precision. (T>=0) is a logical 0 or 1. double converts the answer to double preci...

9 meses ago | 1

| accepted

Answered
Solving Linear System of Equations with a Real Parameter
Using the symbolic toolbox, you can solve it as follows: 1) Define symbolic quantities; syms A B x1 x2 x3 x4 lamda 2) Write t...

9 meses ago | 1

| accepted

Answered
Not sure why vector changes assignment when using ode45
I dont think that the statement out3=(3,1) is a valid statement. It may be that out3 is not the size that you intend. try o...

9 meses ago | 1

Answered
Why ,the quaternion values from sensor fusion toolbox are switched ?
There are two different ways that are commonly used to represent quaternions. Q = [a,b,c,d] with d being the scalar part, and a...

9 meses ago | 0

Answered
Euler's method for two first order differential equations?
Try preallocating x and y nsteps = (b-a)/h + 1; % this is the number of elements in t(a:h:b) (It is = N+1) x=zeros(1,nsteps);...

9 meses ago | 0

| accepted

Answered
How do i create a projectile?
Always start by making a drawing of the problem. Define the coordinate system (which way is positive/negative) What are the pa...

9 meses ago | 0

Answered
Error - Undefined function or variable
Line 16: if epsc<=eps0 Variable epsc is not defined.

9 meses ago | 0

Answered
two body problem using ode45
I have studied the 2-body problem and the accuracy of different numerical solutions. See my comments in this thread: Discussi...

9 meses ago | 1

Answered
All sample times for this block must be discrete. No continuous or constant sample times are allowed
On the Simulink toolbar, select "Display" - "Sample time" and check "all". This will show the sample time for all of the signa...

9 meses ago | 0

Answered
Equation of Motion is Blowing Up
It's seems pretty clear from the plot of angle vs. speed that the system is gaining energy. You really need to draw a picture o...

9 meses ago | 0

Answered
Array indices must be positive integers or logical values
Matlab does not allow an index value of zero. deltaR = (b(0) ... similar in deltaS.

9 meses ago | 0

Answered
computation of GPS receiver position based on RINEX observation file
You are using the wrong function to try to read a file. The function 'read' operates on datastores, or images, or video frames,...

9 meses ago | 0

Load more