Community Profile

photo

James Tursa


Last seen: 1일 전
3,585 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

세부 정보 보기...

참여 게시물
보기 기준

답변 있음
Fast conversion of 2 matrices to 1 complex matrix
See this FEX submission for reading and writing interleaved complex data in R2018a or later without extra data copies: https://...

6일 전 | 0

답변 있음
How to replace leading zeroes by spaces with regexprep
One way: fun = @(x)sprintf(['%' num2str(numel(x)) 'd'],str2double(x)); d = cellfun(fun,a,'uni',false); e = cellfun(fun,b,'uni...

6일 전 | 0

답변 있음
trimming matrix arrays arranged within cell arrays
It is not clear whether you want the rows or columns trimmed. Maybe one of these is what you want? TrimmedArray = cellfun(@(x) ...

6일 전 | 0

답변 있음
Runge-Kutta 4th order function error (Matrix dimensions must agree)
Your RK_4 function is not set up to handle vector equations ... it is only set up to handle scalar equations. Also you are not ...

6일 전 | 0

답변 있음
How to pass arguments by reference from Matlab?
doc loadlibrary Create a C header file that gives prototypes for the Fortran subroutines and treat the Fortran arguments as poi...

12일 전 | 0

답변 있음
how to create an array of all permutations
If you want all of them in an array (which might be too large if the number of digits is too large), you can use n = number of ...

13일 전 | 0

| 수락됨

답변 있음
Trying to do calculations for density
Why do you have these lines in your function: P_t=4; P_s=3; H=25; Aren't these variable supposed to be input arguments? See...

13일 전 | 0

| 수락됨

제출됨


freadcomplex and fwritecomplex
Mex routines that read and write interleaved complex data files for MATLAB R2018a or later without extra data copy.

13일 전 | 다운로드 수: 3 |

답변 있음
efficient ways to read and write complex valued data
A mex routine to accomplish this that doesn't use any hacks can be found here: https://www.mathworks.com/matlabcentral/fileexch...

14일 전 | 0

| 수락됨

답변 있음
efficient ways to read and write complex valued data
This may not apply to you, but if you have R2018a or later you can just fread( ) into a real variable directly the interleaved d...

15일 전 | 0

답변 있음
Changing contents of Cell Array mex files
When you mxDestroyArray a cell array or struct array, it does a deep destroy. Meaning all of the cell array or struct array ele...

18일 전 | 0

| 수락됨

답변 있음
solution with the Runge-Kutta method HELPP
This is clearly a homework/exam question, so I will only offer hints. The code you have posted is for a single scalar different...

19일 전 | 0

답변 있음
How could I use MATLAB to solve for x with this equation, 0=a*x^(3)+b*x^(-1)+c.
Just use the roots( ) function. If you have a negative integer power of x in the expression such as x^(-n), then multiply every...

20일 전 | 0

답변 있음
reshape loop resulted cell array
result = cell2mat(c1(:))';

25일 전 | 0

| 수락됨

답변 있음
Matrix with nested for loops
You don't need loops for this. E.g., p = the probability result = rand(20,20) < p; % your matrix of 0's and 1's

25일 전 | 0

| 수락됨

답변 있음
Bit xor of two binary strings and conversion into decimal
The xor part as a logical vector result result = str1 ~= str2; Or if you wanted it as char: str3 = char((str1 ~= str2) + '0')...

25일 전 | 0

| 수락됨

답변 있음
Function 'quatrotate' not supported for code generation.
You can always write your own. Just code up the matrix multiply at the bottom of the doc page: https://www.mathworks.com/help/...

26일 전 | 1

답변 있음
Reshaping a complex 3D array into 1D, and back
I suspect the problem may be that you originally put the data into rows of a matrix. This separates the elements in memory. I....

26일 전 | 0

답변 있음
Problem with function handle
f by itself is just a function handle, not the function handle evaluated for any input. You need to give f an input. E.g., b=...

27일 전 | 1

| 수락됨

답변 있음
How can I find all possible combinations of rows from two separate arrays?
E.g., For arbitrary values in A and B, doesn't have to be B = -A n = size(A,1); C = repmat({A},2^n,1); mask = dec2bin((0:(2^n...

27일 전 | 0

답변 있음
Velocity,Acceleration,Angle
This is a dynamics class. Dynamics involves derivatives. How can you be in a dynamics class without knowing calculus and how t...

27일 전 | 1

| 수락됨

답변 있음
Randi(imax,m,n)
The point is that once the eps of the max value is greater than 1, you cannot represent contiguous sets of integer values in dou...

27일 전 | 2

답변 있음
How this code works and why for? What action does this code take?
You could look here: https://en.wikipedia.org/wiki/Bubble_sort

27일 전 | 1

답변 있음
Creating all possible combination of a letter/string
One way to create a matrix of these character strings: dem_a='ABC'; % assume starting string is all upper n = numel(dem_a); r...

27일 전 | 0

| 수락됨

답변 있음
Implementation of a matrix
You haven't told us what x and e are, but assuming x is a vector and e is a scalar, simply this: result = cos( (1:n) .* x(:) * ...

28일 전 | 4

| 수락됨

답변 있음
Array indices must be positive integers or logical values.
n = 0 and then you use it as an index: n=0; for i=n:1:tam-1 if xi(n)*xi(n+1)<0 You can't have a 0 index. Also, min is t...

약 1달 전 | 0

답변 있음
Formatting floating and integer signed numbers
sprintf("%0.2f%+0.2f",a,b) Having the + inside the %format stuff forces the sign to print.

약 1달 전 | 0

| 수락됨

답변 있음
For-loop in MATLAB
You should not modify the index variable i inside the loop: for i = 1:length(Corr_vector) : i=i+44; % this is ba...

약 1달 전 | 0

답변 있음
Finding All Combinations of Elements in a Vector
N = 6; result = dec2bin((0:(2^N-1))') - '0'; Then the various vectors you want are the rows of result. Or, if you really want...

약 1달 전 | 1

| 수락됨

답변 있음
About floating point format
The 64-bit floating point format is IEEE double: https://en.wikipedia.org/wiki/Double-precision_floating-point_format The 32-b...

약 1달 전 | 0

Load more