Answered
I have a C function created using Compiler CDK and it's returning a large array but it's MxArray** type. How do I access all the data retunred to the calling C function?
A function signature like that typically means that the mlfMPrime_CA_P( ) function is creating an mxArray and then returning the...

alrededor de 2 meses ago | 0

Answered
[SOLVED] Why is 'size_t' in external C library interpreted wrong?
I am unaware of MATLAB treating size_t differently, but there is a potential error in your code snippet: int foo(size_t sz, uin...

alrededor de 2 meses ago | 0

Answered
How can I speed up an exponential function?
I'm not sure what the issue is since you seem to already know about logical indexing. E.g., test1 = your data x = test1 > 0.0...

alrededor de 2 meses ago | 2

| accepted

Answered
Result of asind changed between R2016b and R2019b
This is a bit strange. I would have expected the later version to be better, but it appears to be worse: >> version -release ...

alrededor de 2 meses ago | 0

Answered
could you help me with this explanation?
It's possible you just need to switch to element-wise operators. E.g., OverallEffectinevess = (MassFlowFunction.*ConvectionCoo...

alrededor de 2 meses ago | 0

| accepted

Answered
Solving Coupled ODE's by ode45
Start with your example (assuming that dx/dy was supposed to be dx/dt as you had originally): dx/dt = 3*(dy/dt) + 4*x, dy/dt = ...

alrededor de 2 meses ago | 1

Answered
How can convert binary Numerical Values to Strings?
E.g. >> b = rand(5)<.5 % generate some sample data b = 5×5 logical array 0 0 0 1 1 0 1 0 1 1 1...

alrededor de 2 meses ago | 1

Submitted


IEEE 754r Half Precision floating point converter
Converts MATLAB or C variables to/from IEEE 754r Half Precision floating point bit pattern.

alrededor de 2 meses ago | 13 downloads |

Answered
how do you program the file path when you do not know where the person will save the matlab file you send them?
If you don't want to write code to search multiple directories to find the files, your code is going to have to ask the user to ...

alrededor de 2 meses ago | 0

Answered
how do I get only 1 variable passed through a function?
switch choice; case '1' fprintf('What is the circle''s radius?\n') r = input(' '); [C,E] = circu...

alrededor de 2 meses ago | 0

Answered
How do I create a matrix with all binary combinations?
dec2bin(0:2^N-1) - '0' Note that this is only practical for relatively small values of N. Even moderatly large N can cause thi...

alrededor de 2 meses ago | 1

Answered
Not getting expected results
I get the identity matrix with your code: >> phi = 0; >> psi = 0; >> theta = 0; >> R=[cosd(phi).*cosd(psi)-sind(phi)...

alrededor de 2 meses ago | 1

Answered
Obtain specific dimension from multidimensional Arrays
Not really sure what you are asking, but if you only want to pick off some indexes from an arbitrary dimension, simply supply th...

alrededor de 2 meses ago | 0

Answered
How to exit a while loop after a certain number of values have been saved to a matrix
The general form for while loops is typically some variation of these: while( condition ) % stuff that eventually alters t...

alrededor de 2 meses ago | 0

Answered
Using an array as input argument of a function handle
c = num2cell(a); J_num = J(c{:});

alrededor de 2 meses ago | 0

| accepted

Answered
How to find the average of monte carlo simulation
You could save the r's in a vector. E.g., r(i) = poissrnd(lambda); Or you could generate all of the r's at once without the lo...

alrededor de 2 meses ago | 0

| accepted

Answered
error decimal aproximation, extra decimal
Welcome to the world of floating point arithmetic! See this link: https://www.mathworks.com/matlabcentral/answers/57444-faq-wh...

alrededor de 2 meses ago | 0

Answered
For loop for multiple scenarios
E.g., for k=1:numel(h_max) % use h_max(k), a_max(k), and SM(k) in your code here end Or if they need to vary independent...

alrededor de 2 meses ago | 0

Answered
How to write a function to determine if the inputed date is valid.Whats wrong with my valid_date function?
Consider these lines: if( any(month == [4,6,9,11]) && day<=30 ) % <-- if you pass this test valid = true; ...

alrededor de 2 meses ago | 0

Answered
calculate the probability of tomorrow's climate
The normal distrubion is a continuous distribution. To answer questions like "probability of temp greater than" or "less than"...

alrededor de 2 meses ago | 0

Answered
how can I display my result: the problem on fprintf command
The format string is first, not last. E.g., fprintf('%s\n\r', expo_result);

alrededor de 2 meses ago | 0

| accepted

Answered
Out of memory Problem [Problem 2 , Project Euler (Sum of even Fibonacci numbers)]
Don't store all of the numbers as you go and then add them up at the end. Only keep a few numbers in memory at one time and do ...

alrededor de 2 meses ago | 0

Answered
What is the convention of the new quaternion( ) class introduced in R2018b?
The new quaternion( ) class introduced in R2018b is a generic class. The functions it uses can be made to be consistent with qu...

alrededor de 2 meses ago | 1

Question


What is the convention of the new quaternion( ) class introduced in R2018b?
MATLAB introduced a new quaternion( ) class in R2018b. How does this compare to other existing quaternion functionality in MATL...

alrededor de 2 meses ago | 1 answer | 1

1

answer

Answered
how to convert a rotation matrix to a rotation vector
I can't find the computeRotationVectorForAnglesCloseToPi( ) function. Where is this from? The "(w,v) is a unit quaternion" sta...

alrededor de 2 meses ago | 0

Answered
Matrix Error when typed in
This is just a display issue. All values are what you entered (or, at least the closest IEEE double representation). That 1.0e...

alrededor de 2 meses ago | 0

Answered
Can we solve this problem without using sort?
Introductory programming classes usually start with the bubble sort. See here for the algorithm in pseudo-code: https://en.wik...

2 meses ago | 0

Answered
How can I add a column to existent 3D matrix
First, you need to realize that the size of your insert will be 180 x 1 x 107. I.e., it is not just a 180 element column you ne...

2 meses ago | 0

| accepted

Answered
Ambiguity in DCM to Quaternion conversion using the default Simulink library block
Quaternions used for rotations have an inherent sign ambiguity, as you seem to already know. That is, -q produces the same rota...

2 meses ago | 0

Answered
Why is the Euler Output of the Quaternion Block different than the Euler Angles block in the Aerospace Blockset?
On a related note, the Aerospace Toolbox uses a different quaternion convention than the Robotics Toolbox. One is basically the...

2 meses ago | 0

Load more