Community Profile

photo

James Tursa


Last seen: Today Active since 2007

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

Statistics

All
  • 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

View badges

Content Feed

Answered
How can I solve x^4-1=0
doc roots

ongeveer 9 uur ago | 0

Answered
Convert unsigned integer to decimal
Not sure what the real question is here. Does one of these do what you want? int1 = uint32(hex2dec('9d900000')); int1 = uint32...

ongeveer 24 uur ago | 0

Answered
convert integer to bytes
Depending on what you are doing downstream with this, you can use the typecast( ) function. E.g., bytes = typecast(my_integer,'...

1 dag ago | 0

| accepted

Answered
Selecting multiple different rows in a 3D matrix
You can use a vector for the indexing. E.g., x = matrix(:,:,[2:16,24:48]); Does that, or something like that, do what you wan...

1 dag ago | 0

Answered
Using a variable vector in a loop
Suppose you store the column vectors in a matrix called V. Then vk would simply be V(:,k). And if the uj are stored in a matrix...

4 dagen ago | 1

| accepted

Answered
Fortran code in Matlab
I'm trying to figure out the purpose of the backslash \. If this was the last character in the format statement then I would ass...

4 dagen ago | 0

Answered
Assigning mxUint16 variable to plhs[0]
You cannot attach native C/C++ memory to an mxArray. The MATLAB API "mxSetEtc" functions check to see that the memory addresses ...

4 dagen ago | 0

| accepted

Answered
How to separate a vector into two different vectors?
Others have already pointed out better ways of doing this. But to answer your question as to why your current code is not workin...

5 dagen ago | 1

Answered
Nested "For Loop" Array Size
To keep the indexing the same, just use the top value from the loops. E.g., DataArray = nan(300,50,100,numel(inputValsY3)); No...

6 dagen ago | 0

| accepted

Answered
convert value from radian form to degree form
If you have values, then just number_in_radians = number_in_degrees * (pi/180); If you are working with trig functions, note t...

12 dagen ago | 0

Answered
Calculate taylor series using while loop
Looks like you are planning to use the identity ln(5) = ln((1/5)^-1) = -ln(1/5) and then use 1/5 as the x in the Taylor Series e...

13 dagen ago | 0

Answered
How to multiply row of matrix A with column of matrix B?
Maybe this is what you want? C = sum(A .* B.',2)

13 dagen ago | 0

| accepted

Answered
Create variable with names of cell array
See this link: https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-ev...

13 dagen ago | 0

Answered
just started matlab just wondering how to set up a 'for' loop
Here is an outline to get you started: x = _____; nmax = _____; result = 0; for n=1:nmax result = result + _____; end ...

15 dagen ago | 0

Answered
How can ı solve this triangle problem at MATLAB?
If you can find cos(x), you might look at feeding that into the acos( ) function to recover x.

15 dagen ago | 1

Answered
interpolation for 4cos(x) − ex = 0
Without seeing the text of your assignment, I would presume that this is the outline of what you are supposed to do: 1) Define ...

15 dagen ago | 1

| accepted

Answered
Solving a large number (thousands) of different "Ax=b" equations when the matrices A are all the same small size (3x3 to 6x6), but different numbers.
See this FEX submission by Bruno Luong: https://www.mathworks.com/matlabcentral/fileexchange/24260-multiple-same-size-linear-so...

17 dagen ago | 0

Answered
euler's method
Your code does not have enough states. You have a 2nd order ODE (the highest derivative present is 2), so the state vector need...

18 dagen ago | 1

Answered
Sum of series in matlab
You could use a simple matrix multiply for this (it looks like the x is the first row and the y is the second row): A = R(1,1:2...

19 dagen ago | 0

Answered
How does vrrotvec calculate rotation?
It is a simple algorithm that uses the cross product for the axis (normalized), and the dot product is used to calculate the ang...

20 dagen ago | 0

| accepted

Answered
How do I make a condition statement for an element that presents in two different arrays but is at the wrong position? This also applies to more than one elements
Assuming you have already made the check for the correct number in the correct spot, you can use this ismember(final_code_guess...

21 dagen ago | 0

Answered
MATLAB determine if matrices are invertible or not
You can use rank( ) for this: https://www.mathworks.com/help/matlab/ref/rank.html?searchHighlight=rank&s_tid=srchtitle_rank_1 ...

21 dagen ago | 1

Answered
Using Trapezodial rule Matlab
The trapezoid rule is for situations where you know the function values in advance, but you don't have this situation. I.e., if ...

23 dagen ago | 0

Answered
fortran subroutine includes several other subroutines
Note that the timestwo.F example that comes with MATLAB is a bad example of Fortran code. It has several bugs in it that could l...

25 dagen ago | 1

Answered
Call C/C++ Code from MATLAB Code
If your code includes a file called MyStruct.h, then yes you should have such a file. I would expect it to be something like th...

25 dagen ago | 0

Answered
Matlab tries to use mex files not on search path
You should use debugging to find out why this is happening. Type the following at the command line: dbstop if error then run y...

25 dagen ago | 0

| accepted

Answered
MATLAB: failed creating a diagonal matrix
You probably have inadvertently created a variable named 'diag' in your workspace, and hence diag(x) is simply indexing into thi...

26 dagen ago | 0

Answered
For-loops are now faster than some of the simplest vectorized statements. Why do we still need so much deep copying?
I have read rumors in the past that TMW was tinkering with the idea of sub-array references, or some type of limited pointer cap...

26 dagen ago | 1

| accepted

Answered
what correction is required in the code?
If the homework assignment specifies you must use a loop, then I don't think the intent was for you to wrap a simple i=1 range a...

27 dagen ago | 0

Answered
I am trying to solve 3rd order ode by RK45, but I did not get solution and plot, kindly fix my issues
The image appears to show seven equations (H1', H2', ..., H7') with boundary conditions at 0 and infinity. The RK45 scheme you ...

27 dagen ago | 0

| accepted

Load more