回答済み
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; ...

約6年 前 | 0

回答済み
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"...

約6年 前 | 0

回答済み
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);

約6年 前 | 0

| 採用済み

回答済み
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 ...

約6年 前 | 0

回答済み
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...

約6年 前 | 1

質問


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...

約6年 前 | 1 件の回答 | 1

1

回答

回答済み
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...

約6年 前 | 0

回答済み
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...

約6年 前 | 0

回答済み
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...

約6年 前 | 0

回答済み
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...

約6年 前 | 0

| 採用済み

回答済み
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...

約6年 前 | 0

回答済み
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...

約6年 前 | 0

回答済み
rotate a vector by orientation defined by Euler angles
MATLAB uses two different quaternion conventions in their toolboxes. The Aerospace Toolbox quaternion convention is essentially...

約6年 前 | 0

回答済み
Is quaternion multiplication associative?
You just need to simplify it to see that the result is in fact 0's. E.g., running your code gives this for X-Y: ans = [ cos(t...

約6年 前 | 0

回答済み
how to make Ascii 7 bit in matlab
MATLAB uses ASCII for encoding characters. So you can just do this to get the characters: ASCII = char(0:127);

約6年 前 | 0

回答済み
Get the factorial of an array
The factorial( ) function is vectorized, so just call it: >> n = [1 9 1 3 7 2 5 4 0 9]; >> factorial(n) ans = Columns 1 t...

約6年 前 | 2

回答済み
Commands for Simulations using Quaternions
Not to be flippant, but the cheapest way is to not buy a toolbox just for the functions you need, but simply write your own func...

約6年 前 | 1

回答済み
Feedback control - need to update an algebraic variable within ODE function.
I think you are using the wrong tool for this. ode45( ) is an adaptive integrator, which means that it has the freedom to chang...

約6年 前 | 1

回答済み
general vector code question
MATLAB does not support the i, j, k quaternion "complex" numbers. The i and j in MATLAB are strictly the ordinary imaginary num...

約6年 前 | 0

回答済み
help With rotating vectors
We need more detail. Your quat_2_new is a unit quaternion, so it can be used for rotations. If your quat_1 is just supposed to...

約6年 前 | 0

回答済み
quat2eul(quat) and dcm2Angle(R) difference for ZYX sequence
MATLAB uses two different quaternion conventions in their toolboxes. In particular, the quaternion convention used in the Aeros...

約6年 前 | 1

| 採用済み

回答済み
Memory allocation for structure array
The 112 I think is an estimate of the size of an mxArray header (the internal structure for each variable that MATLAB uses behin...

約6年 前 | 1

回答済み
using logic with units - can it be done?
Don't use == for single quoted strings, since that will do an element-by-element calculation. So this if (data.units == 'm/s')...

約6年 前 | 0

| 採用済み

回答済み
Why do i keep getting this," Incorrect use of '=' operator." error?
This is not valid MATLAB syntax: for m=1:M & n=0:N Maybe you wanted nested for loops? for m=1:M for n=0:N z = z+...

約6年 前 | 0

| 採用済み

回答済み
Add Consecutive Numbers sent to a Matrix in a Matlab Function
Sounds like maybe you want persistent variable behavior. E.g., function travel_dist = DeltaDistance(x) persistent y if( isemp...

約6年 前 | 0

| 採用済み

回答済み
Recursive definition of anonymous function
@(x) STUFF Takes a snapshot of all of the workspace variables used in STUFF in order to create the function handle. It doesn't...

約6年 前 | 1

| 採用済み

回答済み
help PLease, RK4!
You left out some * operators on the k2 and k3. This fy = @(time,x1,x2,x3) m2*x2+c3*(x2-x3)+c2*(x2-x1)+k3*(x2-x3)+k2(x2-x1); f...

約6年 前 | 1

回答済み
OpenMP in mex file only produces 1 thread
What if you try to force it? E.g., #pragma omp parallel num_threads(omp_get_max_threads()) Or maybe omp_set_num_threads(omp_...

約6年 前 | 1

| 採用済み

回答済み
if x=0
x = input('x value: '); y = input('y value: '); k = x * y; if k == 6 % <-- Use == for equality test k1 = 2; elseif k ...

約6年 前 | 0

| 採用済み

回答済み
Performing calculations on a vector
The log10( ) function is vectorized, so just this result = 20 * log10(4*pi*d./lambda);

約6年 前 | 0

| 採用済み

さらに読み込む