Réponse apportée
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) ...

environ 6 ans il y a | 0

Réponse apportée
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, ...

environ 6 ans il y a | 2

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 1

Réponse apportée
circle with three points
Try this.

environ 6 ans il y a | 0

Réponse apportée
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...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 1

Réponse apportée
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...

environ 6 ans il y a | 0

Réponse apportée
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);...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 0

Réponse apportée
Error - Undefined function or variable
Line 16: if epsc<=eps0 Variable epsc is not defined.

environ 6 ans il y a | 0

Réponse apportée
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...

environ 6 ans il y a | 1

Réponse apportée
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...

environ 6 ans il y a | 1

Réponse apportée
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...

plus de 6 ans il y a | 0

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

plus de 6 ans il y a | 0

Réponse apportée
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,...

plus de 6 ans il y a | 0

Réponse apportée
Newton's Method error message
The variable x is not defined in w(n+1) = w(n) - (z(w(n))/dz(x(n)));

plus de 6 ans il y a | 0

Réponse apportée
Convert Milliseconds to Clock time from excel file
Let X be the time in miliseconds. Xs = X/1000; % the total time in seconds Hour = floor(Xs/3600) ; % The number of hours in x...

plus de 6 ans il y a | 0

Réponse apportée
How can I simulate data when I only know the derivative?
This is exactly how time-based simulations are done. You have the mathematical model of the system state derivative(s) (i.e. dx...

plus de 6 ans il y a | 1

Réponse apportée
how do I give in this kind of transfer function in Simulink
Simulink Transfer Function

plus de 6 ans il y a | 0

Réponse apportée
I can not find an error in the expression
It's hard to say without seeing how the variables r, t, and p are defined. If r and p are vectors of different length, then the...

plus de 6 ans il y a | 2

Réponse apportée
create Simulink custom block
You can create almost anything you like. See the "user defined functions" tab in the library browser. You can use a "MATLAB fu...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Matlab code for Euler method help
One thing that I notice is that you are defining N based on numel(T), but it looks like T is not yet defined, so what is the val...

plus de 6 ans il y a | 0

Réponse apportée
What is the best way to find angles between these two lines?
The angle between vectors is determined using the vector dot product. Calculate the unit vectors and angles as follows: v1x ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Need technique to compare accuracy between different methods
As @darova suggests, if you have an analytical solution, then you can compare your numerical solution to the exact answer. This...

plus de 6 ans il y a | 0

Réponse apportée
lookup table in simulink
There is no reason that non-uniform breakpoint spacing should be causing an error with the 1D interpolation function. I think t...

plus de 6 ans il y a | 0

| A accepté

Question


What is the best way to insure that all of my functions are using the same constant values?
I want to make sure that my functions are all using the same values for physical constants, like earth radius, elipsoidal flatte...

plus de 6 ans il y a | 2 réponses | 1

2

réponses

Réponse apportée
Why will these plots not plot on the same graph?
You need to turn on "hold" mode to plot more than one plot on the same axes. If you do not use hold, the next plot replaces the...

plus de 6 ans il y a | 0

Réponse apportée
Communication delay & jitter delay modelling
Here is my interpretation of what you are asking. It seems that this woud be very easy in Simulink. You have signal PT which i...

plus de 6 ans il y a | 0

Réponse apportée
Simulink switch that is based on probability
This seems to work for me (The uniform random number is set to a range of 0 to 1):

plus de 6 ans il y a | 0

| A accepté

Charger plus