Réponse apportée
Finding collumn with specific values within matrix
Is this what you are trying to do? indt = ind(1:5,:)'; [~,k] = ismember(sort(v1)',indt,'rows'); index1 = ind(6,k) The first ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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'

plus de 6 ans il y a | 0

Réponse apportée
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 ) % ...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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 ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
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)

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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)

plus de 6 ans il y a | 0

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

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How do I rearrange these matrix values?
A = your matrix result = reshape(A,3,4)'

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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 ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 3

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

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

plus de 6 ans il y a | 1

Réponse apportée
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). ...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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);

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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 [...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 1

Réponse apportée
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...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
increase number of decimals
Just type your format at the command line. E.g., format longg

plus de 6 ans il y a | 0

| A accepté

Charger plus