답변 있음
Cpp to Mex conversion
Looks like you have a mismatch with variable types, probably an older piece of code that you are trying to compile on a newer MA...

거의 7년 전 | 1

| 수락됨

제출됨


mxGetPropertyPtr & mxSetPropertySDC C-mex functions
Fast memory efficient alternative to API functions mxGetProperty & mxSetProperty.

거의 7년 전 | 다운로드 수: 1 |

4.5 / 5

답변 있음
how to solve 'Error using | Matrix dimensions must agree. ' ?
Maybe this line: while (Lia2_One_Three ~= zeros(length(Lia2_One_Three),1) | Lia2_Two_Three ~= zeros(length(Lia2_Two_Three),1)...

거의 7년 전 | 0

| 수락됨

답변 있음
Print from C file into Command window via MexFile
"However I would like to print directly from the c-file to Matlab Command Window. Is that possible?" Yes, that is what mexPrint...

거의 7년 전 | 1

| 수락됨

답변 있음
could anyone help me to solve the issue with respect to the code
The syntax of a for-loop is: for k=1:5 % your code here end

거의 7년 전 | 0

답변 있음
Subtracting matrices using a for loop
diff(your_data,1,3)

거의 7년 전 | 0

답변 있음
How can I see the filter function implementation code at MATLAB?
In general, if the function has an associated .m file then TMW is willing to show you that much. Also there may be information ...

거의 7년 전 | 1

답변 있음
If else problem for year
All of those if-elseif blocks make the code difficult to read, and difficult to debug as well. I would advise against that appr...

거의 7년 전 | 2

| 수락됨

답변 있음
Please how can I store all my matrix?
Maybe use a cell array: channel{i} = [importdata(location)]; Then at the end you can work with the individual matrices as chan...

거의 7년 전 | 1

| 수락됨

답변 있음
Fast Elementwise Matrix-Multiplications
The element-wise times operation in MATLAB is already multi-threaded. You are not going to beat it by writing your own low leve...

거의 7년 전 | 1

답변 있음
Defining velocity over particular time frame
You don't need a loop for the velocity. Assuming I understand that you want the velocity to be linear, you just need a vector t...

거의 7년 전 | 0

| 수락됨

답변 있음
Converting C++ bits packed int** to MATLAB unisgned char mxArray using mex?
Some issues: 1) The signature of mxCreateNumericArray according to the doc is: mxArray *mxCreateNumericArray(mwSize ndim, cons...

거의 7년 전 | 0

| 수락됨

답변 있음
Find an optimal solution for a linear system with two inequations
The way you have this problem posed, and assuming by "binary" you mean integer, it can be solved by simple inspection. The max ...

거의 7년 전 | 0

답변 있음
How to formulate the random matrix between real interval?
See the second example in the rand doc here, and use your endpoints of 0.10 and 0.50 instead of the example endpoints of -5 and ...

거의 7년 전 | 0

| 수락됨

답변 있음
Complex matrix inversion using LAPACK in MEX
I took your code and modified it to be a mex routine that takes a 2D double complex input (caution: no argument checking done!) ...

거의 7년 전 | 0

답변 있음
how to reshape this matrix
result = reshape(A.',2,[]).'

거의 7년 전 | 0

| 수락됨

답변 있음
Simulation of irrational numbers
The random number generators that come with MATLAB have very long periods. You can simply use them to form your ratio and it wi...

거의 7년 전 | 0

답변 있음
Printing out the element values in a mxDouble array (C++ script in Matab)
%d is a decimal integer format for use with short, int, long, etc. This doesn't work with floating point. Try e.g. %f or %g inst...

거의 7년 전 | 0

| 수락됨

답변 있음
Runge-Kutta function
Here is some code to get you started. It receives a string from the user for a derivative function of x and t and turns it into...

거의 7년 전 | 1

답변 있음
for loop continued fraction
Yes, you can use the formula x(n) = 1 + 1/x(n-1) if you want to use a loop. Just start with x(1) = 1.

거의 7년 전 | 0

답변 있음
How to sum up multiple vectors, element by element, to recieve one final value?
The numerator is just a simple dot product between two vectors, and the denominator is just a simple sum. Using the fact that a...

거의 7년 전 | 1

답변 있음
Creating a 2D random walk
In this logic, you will never get to the y branches because one of the first two x branches will always be true: if p_x<0.6 ...

거의 7년 전 | 0

답변 있음
Is Walter Roberson a real person, or is he some kind of Matlab AI robot?
Blade Runner 2019 ...

거의 7년 전 | 1

답변 있음
single precision simulation of internal calculations
" Is there a way to set Matlab to perform all calculations (even internal) to single precision? " Not the way you are probably ...

거의 7년 전 | 0

| 수락됨

답변 있음
How do i convert this for loop into a while loop?
This for loop: for i=1:n % stuff end is equivalent to this while loop: i = 1; while i <= n % stuff i = i + 1...

거의 7년 전 | 1

| 수락됨

답변 있음
How can I vertically concatenate cells?
I don't have much of a clue what you really need, but maybe this will give you a start on the MATLAB cell array syntax (with the...

거의 7년 전 | 0

답변 있음
Functions, Error check
From your description, it seems like you simply need to test for the number of characters. E.g., while numel(outstring) == 0

거의 7년 전 | 0

| 수락됨

답변 있음
How to implement such function?
Basically, just replace f(x) with f. E.g., f = constant; : f = coeffVector(i) * cos(i*x) + f; You could also do this wit...

거의 7년 전 | 0

답변 있음
How to from I(x) to permutation and from permutation to I(x)
E.g., >> Per Per = 0 1 2 3 0 2 3 1 0 3 1 2 3 2 0 1 ...

거의 7년 전 | 0

답변 있음
case of two mappings
Not sure which one is first, but maybe one of these is what you want? >> mapping1 = [0 1 3 2] mapping1 = 0 1 3 ...

거의 7년 전 | 0

더 보기