Respondida
is matlab variable object?
All variables have a "class". But not all variables are objects from an OOP class defined with classdef. I think what you are ...

más de 6 años hace | 0

| aceptada

Respondida
how to find the position of in the matrix without using the neither find nor built in functions.
Just add variables to keep track of the locations. E.g., if M(a,b) < min min = M(a,b); mi...

más de 6 años hace | 0

| aceptada

Respondida
8 digit double array to 1 digit double array
For column vector H: H_conv = cell2mat(arrayfun(@(x)sprintf('%08d',x),H,'uni',false)) - '0'

más de 6 años hace | 0

Respondida
What does it mean when you put Loop = 1; in a program
This is a "forever" loop. It executes until a break statement is encountered. E.g., the general construct is while( 1 ) % ...

más de 6 años hace | 0

Respondida
ASCII multiplication returns array of numbers
The characters are converted to double values (ASCII code numbers) and then multiplied. That is the way the * operator works fo...

más de 6 años hace | 0

Respondida
Mex function out plhs[0] is all zeros
There are three problems with your code. 1) Assigning the value of a pointer to another pointer does not attach the pointer to ...

más de 6 años hace | 1

| aceptada

Respondida
Weird output and calling to another function
That's because you are returning m. I think you want to return z: function z = primefactors(m)

más de 6 años hace | 0

| aceptada

Respondida
How to use Shuffle.c index mode for complex numbers
Note: Compiling mex code in R2018a or later with the '-R2017b' option will cause the mex routine to make deep copies of all comp...

más de 6 años hace | 0

Respondida
vector multiplication with its transpose
Variables and expressions in MATLAB need an operator between them ... there is no implied multiply. So this (y(t+1)-y(t))'W(y(t...

más de 6 años hace | 0

Respondida
Matrix dimensions must agree error
t and g look like they are vectors, so use element-wise operators (with the . dot) when dealing with equations involving them. E...

más de 6 años hace | 0

Respondida
Finding the if the complex numbers with the imaginary part not equal to zero (array)
The equality conditional operator in MATLAB is the double equals ==, so y = sp(imag(sp)==0)

más de 6 años hace | 0

Respondida
How do I split one column with 744 rows into 31 columns with 24 values.
A = your column vector result = reshape(A,24,31);

más de 6 años hace | 0

| aceptada

Respondida
How do I rearrange these matrix values?
A = your matrix result = reshape(A,3,4)'

más de 6 años hace | 0

Respondida
Calllib error: Array must be numeric or logical or a pointer to one
This sounds very similar to the following post, where someone was trying to call a function that had a function pointer as one o...

más de 6 años hace | 0

Respondida
Matlab Coding for a spacecraft
Thanks for the image post. So, this is a standard orbital proximity operations relative motion question. The equations in your ...

más de 6 años hace | 0

| aceptada

Respondida
Need help to translate Lat/long as signed 32bit integer to decimal degrees.
The LSB is probably telling you that the value of the Least Significant Bit of the integer value is 1.6764e-07. Since MATLAB al...

más de 6 años hace | 3

| aceptada

Respondida
Determine Matrix Operation Memory Usage
This is going to depend on the specific operations you are doing, and might also depend on whether any of the variables involved...

más de 6 años hace | 0

Respondida
Angle Between two vectors.
This has been discussed many times on this forum. Robust methods are found here: https://www.mathworks.com/matlabcentral/answer...

más de 6 años hace | 1

Respondida
Discrepancy Between ODE45 and Solve
For dslove, the sin(w*t) signal gets divided by m, which is 10. For ode45, you don't do this, you just have sin(w*t). ...

más de 6 años hace | 0

Respondida
mex file update and compile
The use of mxGetDoubles( ) requires that the code is compiled with R2018a or later, and that you use the '-R2018a' option instea...

más de 6 años hace | 1

| aceptada

Respondida
MEXW64 runs on 2019A but not 2020A (DLL Issue)
Mex routines are not guaranteed to work across MATLAB versions. Sometimes they do and sometimes they don't. It depends on the ...

más de 6 años hace | 1

| aceptada

Respondida
Complex number when using variables
Operator precedence >> -50.8478 ^ -1.017 ans = -0.0184 >> (-50.8478) ^ -1.017 ans = -0.0184 + 0.0010i The ^ ope...

más de 6 años hace | 0

Respondida
Cutting down time of Length(unique(V1)
If all the numbers are integers mod 43, then just n = zeros(1,43); n(V1+1) = 1; D = sum(n);

más de 6 años hace | 0

Respondida
How do I solve the nonlinear power equation?
One strategy: Move del Po to the left side Take ln( ) of both sides Put the ln(beta) and n*ln(del P) on one side and the othe...

más de 6 años hace | 0

| aceptada

Respondida
Matrix(Matrix)
The "a" values are simply being used as row numbers for indexing into b. b(a(:),:) = b([1;2;1;2],:) which is equivalent to [...

más de 6 años hace | 0

| aceptada

Respondida
Code not working, velocity comes back the same each time
So here is a version of your code with the following changes: Gravity model replaced with the model found here (also note that ...

más de 6 años hace | 0

Respondida
MEX error LNK2019:unresolved symbol
mxGetDoubles( ) is a new API routine that only exists in the R2018a+ API memory model. You have to compile with the -R2018a flag...

más de 6 años hace | 1

Respondida
Solve equations of Motion using Matlab ODE45
You will have a 4-element state vector instead of 2. initial_cond = [1;1;0;0]; [t,y] = ode45(@(t,y)ODE_funct_fourth_order(t, y...

más de 6 años hace | 0

| aceptada

Respondida
increase number of decimals
Just type your format at the command line. E.g., format longg

más de 6 años hace | 0

| aceptada

Respondida
Comparing orbits between a planet and Red Dwarf
To calculate how often stellar eclipses occur for the 2D geometry, on average, yes all you need to do is look at orbit periods. ...

más de 6 años hace | 0

| aceptada

Cargar más