Question

Is there a way to use fmincon without function handles?

I want to use fmincon as part of an optimization study but I have that inside a MonteCarlo simulation. Using function handles in...

3 years ago | 2 answers | 0

Question

Error using function handles in for loop

I have a function, pi_t, which is defined using a function handle but also is a function i in the for loop. When I try to incorp...

3 years ago | 2 answers | 0

Question

function handles for multiple equations

I have a very simple question that I can't seem to find the answer to. I have a defined equation, P, which has a function handle...

3 years ago | 1 answer | 0

Question

Return values for specific set of indices

I am trying to find values in a matrix for specific indices. I have a 180x180 matrix, N, and have a range of dx and dy values. H...

3 years ago | 1 answer | 0

Question

Search specific layer of multidimensional matrix for range of values?

I have a layered matrix (3 layers) seen below and what I want to do is search for a range of values in the 2nd layer and then th...

3 years ago | 1 answer | 0

Question

find min value of 1st layer of a multidimensional matrix

I want to find the min value of the 1st layer in an n layer matrix and I want to get the indices too. I tried messing around wit...

3 years ago | 1 answer | 0

Question

adding a matrix layer to an already existing matrix

I want to add a layer to my 180x180 matrix, seen below. N is where I define the actual matrix in the code. I want to add a layer...

3 years ago | 1 answer | 0

Question

solve systems of linear equation in for loop

I want to solve a system of 3 equations, all of which are in a for loop. Is there any way to solve for [dx, dy, dt] 180 times an...

3 years ago | 1 answer | 0

Question

Solving the same equations give different values

I am solving a few 3D physics motion equations. For the first function (Landing_Physics3D), I am solving for time, xf, and yf. I...

3 years ago | 0 answers | 0

Question

Error iterating with fractions

I want to do something pretty simple but am not sure how to do because I can't iterate using fractions. What I want is to solve ...

3 years ago | 1 answer | 0

Question

Iterate over specified dimensions in a matrix to find minimum value

I have a 180x180 matrix of random integers. What I want is to scan the rows and columns and find the cell with the minimum valu...

3 years ago | 1 answer | 0

Question

How to replicate a matlab procedure

I currently have a matlab monte carlo simulation that includes multiple for loops. What I want to do is execute the exact same c...

3 years ago | 1 answer | 0

Question

error when using min function

I have a 180x180 matrix of random integers and I am simply trying to find the smallest element but everytime I run the code it s...

3 years ago | 1 answer | 0

Question

how to split a large matrix into smaller matrices and assign random values

I have a 180x180 matrix of 0's and I was to assign different range of random integers to each 45x45 set in the matrix. I have sh...

3 years ago | 1 answer | 0

Question

How to fill a matrix in a specific way

I have a 5x5 matrix of 0's defined as P below. What I want to do is fill it out to become the commented out matrix also seen bel...

3 years ago | 1 answer | 0

Question

How to have matrix values as a function of another variable

I have a matrix P (defined below) that has some values (h and u) that are a function of a variable t. t have values ranging from...

3 years ago | 1 answer | 0

Question

How to iteratively multiply a vector by a matrix iteratively

I want to multiply an initial vector p_t0 by a matrix P. The vector and matrix are specified below. If I simply do p = p_t0*P I ...

3 years ago | 1 answer | 0

Question

Why am I getting an unbalanced parenthesis error?

I am getting an error in line 8 of my code "if (~strcmp(a[:], ' '))" saying "Unbalanced or unexpected parenthesis or bracket." W...

3 years ago | 1 answer | 0

Question

How to read Landscan Data in Matlab

Does anyone know how to read LandScan population data into matlab? There is not much documentation on this. Any help at all woul...

3 years ago | 0 answers | 0

Question

Raspberry pi 3 no longer boots from sd after downloading matlab support package

I installed the NOOBS package onto a blank sd card and put it into the raspberry pi and installed the software and set up the ra...

3 years ago | 2 answers | 0

Question

NAVIO 2 compatibility with matalb/simulink

I just got a NAVIO 2 autopilot to run with my raspberry pi 3 but I cannot seem to find any information whatsoever about how to u...

3 years ago | 2 answers | 0

Question

Gyroscope and accelerometer for raspberry pi 3 and matlab

I am looking for a gyroscope and accelerometer (preferably an all in one) that will interface easily with raspberry pi and is ea...

3 years ago | 0 answers | 0

Question

Where can I find a helpful link or extensive manual for how to use Simulink and/or matlab with Raspberry Pi 3?

I have found a few links on how to use simulink and matlab with raspberry pi but they are all extremely basic and most focus on ...

3 years ago | 1 answer | 0

Question

Solving a third order and second order differential equation

I am first trying to solve the third order ODE 2*d^3f/dn^3+f*d^2f/dn^2=0, where f=S/(u*sqrt(a*x/u)), n=y*sqrt(u/(a*x)), u=dS/dy,...

4 years ago | 1 answer | 0