Community Profile

photo

James Tursa


Last seen: Today
3,751 2007 年以降の合計貢献数

Interested in external applications, mex & engine applications with Fortran, C, C++, etc, particularly in the areas of speed improvement and memory management efficiencies.

連絡する

James Tursa's バッジ

  • Revival Level 3
  • Master
  • Personal Best Downloads Level 3
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • 36 Month Streak
  • Thankful Level 2
  • Knowledgeable Level 4
  • First Answer
  • Solver

詳細を表示...

貢献した分野
表示方法

回答済み
Determining if the columns of a matrix are orthogonal
Using the dot product and comparing it to 0 is a mathematical concept that does not translate well to floating point arithmetic....

約21時間 前 | 0

回答済み
No Description of Error for ode45
Looks like your odefun needs additional inputs that you are not providing. E.g., try changing this [t,x]=ode45(odefun,time_int...

1日 前 | 1

| 採用済み

回答済み
Make Ode45 return non trivial solution
If F(i)=0 and y0=0 and dy0=0, then there is no driving acceleration away from the y(t)=0 solution. I.e., y(t)=0 is the solution...

1日 前 | 0

| 採用済み

回答済み
How do I make an if statement based on whether an index is part of a vector of numbers?
You can use the ismember( ) function for this. E.g., if ~ismember(currentcycle,abnormal_attractors) previous_expmean_v = c...

2日 前 | 0

| 採用済み

回答済み
multiply matrices with different dimensions with loop
Is this what you want? C = A .* B.';

3日 前 | 2

回答済み
Madgwick filter - Quaternion Multiplication
I guess you could generate the following three expressions symbolically: original original + 1 - () original + () - 1 and th...

3日 前 | 1

| 採用済み

回答済み
How to I turn a fprintf column of values into a matrix
You can save all the values for plotting. E.g., xp = x0; yp = y; fp = f(x0); k = 1; for x = x0 : h : xn-h y = y + dy(x,y...

3日 前 | 0

回答済み
Trying to go from Euler to Heun's Method
No, but you are close. You basically need to use the average of y' at the current state with y' at the Euler estimated next ste...

4日 前 | 0

回答済み
Double sum - vector (matrix) solution
result = sum(C(:).*F(:)); or for later versions of MATLAB result = sum(C.*F,'all'); This all assumes that the actual indexing...

4日 前 | 1

| 採用済み

回答済み
Generate list of 2 digit combinations without repetition
Can't you just use the nchoosek(0:9,2) result and add in the known double results 00, 11, etc.?

4日 前 | 0

回答済み
Program to convert decimal to binary and vice versa
See https://www.mathworks.com/help/matlab/ref/dec2bin.html and https://www.mathworks.com/help/matlab/ref/bin2dec.html

4日 前 | 0

回答済み
plotting complex exponential function
E.g., maybe this is what you need y = 1*exp( -i20 *pi * t ) + 4*exp( i20 * pi * t ); plot(t,y); Although it is not clear what...

6日 前 | 0

回答済み
Coding Crowell's Method for Orbiting Bodies
I don't have the patience to go through all of your dim and dimc logic. It would seem to be much easier to code and debug if yo...

6日 前 | 0

| 採用済み

回答済み
Plot the acceleration with ODE45
You find acceleration by taking the x solution from ode45( ) and feeding that back into your derivative function vdp1( ). Since...

6日 前 | 0

回答済み
Multiplying by inverse of a matrix
You are essentially "dividing" by the X'*X quantity, so that is what needs to appear on the "bottom" of the slash. E.g., >> alp...

7日 前 | 1

| 採用済み

回答済み
"Matrix Dimensions must agree"
t is used to build r, but it is not the same length as phi.

9日 前 | 1

| 採用済み

回答済み
How to create a periodic function?
Not sure what you mean by "repeated at [2,10]". Maybe this: y = mod(x,2); ix = y > 1; y(ix) = 2 - y(ix);

10日 前 | 0

| 採用済み

回答済み
How do i use output of one function as input to the other ?
You can do this at the point where you are calling the function neg. E.g., z = neg(pos(x,y),q);

10日 前 | 0

回答済み
Index in position 1 is invalid. Array indices must be positive integers or logical values.
When i=m in your loop you try to access kernel(m-m,n-j) which is kernel(0,m-j), and 0 is an invalid index. Similar problems wit...

10日 前 | 0

| 採用済み

回答済み
Solve a differential equation system with 4th order Runge-Kutta method with three equations
Not sure if you actually use t in your derivative functions, but you are missing that input from your j1, k1, and l1 code: ...

10日 前 | 0

| 採用済み

回答済み
sum of cubes question
This homework question is poorly written: It seems like the intent of the n is to use it as the upper limit of the for-loop, bu...

10日 前 | 1

| 採用済み

回答済み
Calling a function from another function
my_first_function1( ) doesn't return any value to the caller. To return a value you use this syntax: function absx = my_first_...

11日 前 | 1

| 採用済み

回答済み
Numerical integration of the differential equation of motion of the two body problem
Your biggest problem is that you don't carry enough states in your derivative function. Your ODE is a 3D 2nd order equation, so...

11日 前 | 0

| 採用済み

回答済み
How to swap multiple rows of a matrix at a time
A = your matrix A([1:63,142:202],:) = A([142:202,1:63],:);

12日 前 | 0

| 採用済み

回答済み
Probability of binary sequence with Monte Carlo
First point is that probability of stopping at n=3 is not 2/6, it is (3/4)*(2/6) because you have to include the probablility th...

14日 前 | 1

| 採用済み

回答済み
Problem at +/- 180 degrees in orientation estimation from IMU data
You can try the unwrap( ) function: https://www.mathworks.com/help/matlab/ref/unwrap.html

14日 前 | 0

| 採用済み

回答済み
Help with secant method
You might look here which even includes example code: https://en.wikipedia.org/wiki/Secant_method

15日 前 | 0

回答済み
How do I add an integer to every or any nth row
A(k,:) is the k'th row of A A(:,k) is the k'th column of A A([k m p],:) is the sub-matrix formed from the k'th, m'th, and p'th...

15日 前 | 1

| 採用済み

回答済み
First and last occurrence of an element in an array
So the description of the problem doesn't say anything about consecutive values, so the code you have for that should be elimina...

15日 前 | 0

| 採用済み

回答済み
Parse error at ']'
Looks like you just need commas instead of periods. E.g., [r,i,v,dr,di,dv]

16日 前 | 0

Load more