답변 있음
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=...

거의 6년 전 | 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...

거의 6년 전 | 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...

거의 6년 전 | 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...

거의 6년 전 | 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

거의 6년 전 | 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...

거의 6년 전 | 1

| 수락됨

답변 있음
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(:) * ...

거의 6년 전 | 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...

거의 6년 전 | 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.

거의 6년 전 | 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...

거의 6년 전 | 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...

거의 6년 전 | 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...

거의 6년 전 | 0

답변 있음
vector multiplied a matrix
Maybe this is what you want if c is 5 x 1 and T is 5 x 101: f = c.' * T;

거의 6년 전 | 1

| 수락됨

답변 있음
why do i receive this error?
You have written a file called input.m that is shadowing the MATLAB function of the same name. You need to rename your input.m ...

거의 6년 전 | 0

제출됨


num2strexact (exact version of num2str)
num2strexact does exact conversion of number to string based on IEEE floating point bit pattern

거의 6년 전 | 다운로드 수: 2 |

5.0 / 5
Thumbnail

답변 있음
Binary to DNA sequence conversion
x = A(i:i+1); But if you are going to process pairs of characters in A, then maybe you need to step by 2 as well, e.g. for i=1...

거의 6년 전 | 0

| 수락됨

답변 있음
Manipulating dimensions without using loops
It looks like the indexing is consecutive, it is just that you have a mixture of reshaping (which doesn't change memory order of...

거의 6년 전 | 0

답변 있음
How can I rotate a set of points around an axis?
Arrange your points as column vectors and do a matrix multiply. E.g., result = rotmxXYZ * K.'; The result will have your point...

거의 6년 전 | 0

| 수락됨

답변 있음
Solve linear least square problems with non-linear constraints
If you have two sets of corresponding points from two different coordinate systems and you are simply trying to find the "best" ...

거의 6년 전 | 0

답변 있음
Error using mex : In function 'void mexFunction(int, mxArray**, int, const mxArray**)'
The error is not with mexFunction. The error is with line in your source code: const int32_t *dims1 = mxGetDimensions(prhs[1])...

거의 6년 전 | 1

답변 있음
How to change code from C to matlab script?
This is just straightforward arithmetic, so the conversion is pretty simple. I would forget about using single precision floats...

거의 6년 전 | 1

| 수락됨

답변 있음
Relative rotation between two IMU's
Assuming the coordinate frames are as follows: ECI, the world frame BODY1, the IMU1 body frame BODY2, the IMU2 body frame Ex...

거의 6년 전 | 0

| 수락됨

답변 있음
How much money will I accumulate over x amount of years
Those last three lines need to be put into a loop. That is, each month this happens to the balance balance = balance * (1 + r)...

거의 6년 전 | 0

답변 있음
Fibonacci.m for Fibonacci Series
You function is not vectorized ... that is, it is not written to handle anything other than a scalar input. As written, you wou...

거의 6년 전 | 0

| 수락됨

답변 있음
slicing matrix in efficient way
Another way: a = 1:120; r = reshape(a,30,[]); x = r( 1:10,:); y = r(11:20,:); z = r(21:30,:);

거의 6년 전 | 1

답변 있음
ode45 and euler not working for random signal
You can't use random inputs with ode45( ). ode45( ) relies on the ability to call the derivative function at arbitrary times to...

거의 6년 전 | 0

답변 있음
Fourth Order Runge-Kutta Method for the System of three Differential Equation
I don't really want to sift through all of that code, mostly because you are using different variables for the various states. ...

거의 6년 전 | 1

답변 있음
calling a c function with calllib doesn't work with pointers
A basic general outline of freeing the memory would be: double *sortie = NULL; // top level variable void free_sortie(void)...

거의 6년 전 | 0

답변 있음
Problem using a mex.c file
Looks like you need to compile the mex file. You will need to install a C compiler if you haven't already. If there is a build...

거의 6년 전 | 0

답변 있음
View Reshape Function Code
All it basically does is replace the dimensions with the requested dimensions in the internal variable header. There wouldn't b...

거의 6년 전 | 1

| 수락됨

더 보기