How to integrate for each row of parameters in a matrix, rather than using a loop
Hello, I have been the following code to calculate an integral: Price = @(z, pg0, pf0, epsilon) ... (pg0.^(1...
bijna 2 jaar ago | 1 answer | 0
fsolve, fmincon producing different results
Hi, I am wondering how to think about fsolve and fmincon producing different results when solving the same system of nonlinear ...
ongeveer 2 jaar ago | 2 answers | 0
How to modify a uniform distribution to make a custom distribution?
Hello, I am trying to write down a custrom distribution function that essentially motifies slightly a uniform distribution. Fo...
ongeveer 2 jaar ago | 1 answer | 0
How to store results from a function?
Hello, I'm using fminsearch to find parameters (para) that minimize the objective function. To exaplain, I have the following l...
meer dan 2 jaar ago | 1 answer | 0
How to replace elements in a matrix using logical
Hello, I would like to set some columns to zero for certain rows indicated by a logical. For instance, if we have a matrix X ...
ongeveer 3 jaar ago | 1 answer | 0
convert a 3D matrix to a 2D matrix
Hello, I'm trying to convert a A by B by C matrix (3D) into a A*C by B matrix (2D). But I need the column (with A*C elements) t...
ongeveer 3 jaar ago | 2 answers | 0
How to collapse within a column vector
Hello, I am trying to collapse a long column to a shorter one by suming across elements. For instance, if I have: x = ...
meer dan 3 jaar ago | 2 answers | 0