Recent content by LeBrad

  1. L

    System memory/Causality Question

    The system is causal if the output y(t) does not depend on future values of the input x(t). If t>0, then since the integral limits go from lambda= 0 to lambda = t, x(lambda) never depends on anything greater than t. However, if t<0, then y(t<0) depends on x(0), and is therefore not causal...
  2. L

    Linear programming bank assets problem

    Also, for c), instead of P <= 125 Million you may want P <= .25*(B+H+C+P) Turns out not to matter for this case though.
  3. L

    Linear programming bank assets problem

    Based on the constraints, that seems like the right answer. It doesn't actually minimize risk by diversifying, but it satisfies the constraints that the problem defines as the ones chosen to minimize risk. The problem would be more interesting if, say, personal loans had the highest yield...
  4. L

    MATLAB Efficiently Set a Sequence in Matlab: Quick Question Answered

    I think you're just referring to the tick marks on the axis. The distribution of tick marks is not related to the number of points plotted on the graph. You can change the tick mark distribution either going to 'axis properties' in the 'edit' menu of the plot, or you can define them from the...
  5. L

    MATLAB Solving Matlab Noob Question: Updating Variables with deltax

    What exactly are you trying to do? It looks like you're trying to iteratively solve a system of nonlinear equations? I think your question is about why your solution vector d is not updating. It sounds like you want to add something like 'd = d + deltax' so that d changes at each step of the...
  6. L

    MATLAB, eigenvalues and condition number of a symmetric square matrix

    First, how do you find the condition number of a matrix if you know the eigenvalues? Second, how do you compute the eigenvalues using the power method? Which of these are you having trouble with?
  7. L

    MATLAB Plotting a 3D Gaussian in MATLAB

    w is a parameter of your Gaussian, make it bigger and the distribution should flatten out. What exactly do you want to plot? You can't plot A(x,y,z) on a 3D plot because A depends on 3 variables so you would need a 4D plot. If you want to plot a Gaussian distribution of 2 variables, run...
  8. L

    MATLAB Solving 5 Unknowns with Gauss-Seidel in MATLAB

    What is the problem, do you not know Matlab or not know the Gauss-Seidel algorithm?
  9. L

    Stability of Crank-Nicholson method

    If your equation is Au_j = Bu_{j-1}, then u_j = A^{-1}Bu_{j-1} and u_{j+1} = A^{-1}Bu_{j}= \left(A^{-1}B\right)A^{-1}Bu_{j-1}, and u_{j+2} = A^{-1}Bu_{j-1}u_{j+1} = \left(A^{-1}B\right)^3u_{j-1}. You can continue this on forever to get the term after n steps as u_{j+n} =...
  10. L

    MATLAB Integrating Function with MATLAB - Solve & Plot

    In these three lines u(n) = 0.5.*(t.^2) + t; u(n) = -1.*(exp(-t)); u(n) = 1.*t; you are trying to store a vector in a scalar's place. u(n) is a scalar and t is a vector, so change t to t(n) and you will be fine. Also, be sure to define t properly (don't see it in your...
  11. L

    Stability of Crank-Nicholson method

    By defining A,B, and the problem more clearly. Are you saying you need to prove that if p(A^-1 B)<1, then the Crank-Nicholson method applied to some equation involving A and B is stable?
  12. L

    How do I solve a system of ODEs with initial conditions in MATLAB?

    From your Matlab code: options = odeset('RelTol',1e-3,'AbsTol',[1e-3 1e-3 1e-3 1e-3]); the relative tolerance and absolute tolerance are set here to 1e-3. To make the tolerance tighter, just change these numbers to something smaller, for example, 1e-8 (for all of them). Eigenvalue...
  13. L

    How do I solve a system of ODEs with initial conditions in MATLAB?

    It's a linear system, so the solution is Y(t) = e_m^{At}x_0 where x_0 is the initial condition, e_m is the matrix exponential, and A is a the matrix \begin{bmatrix} 0 & 2 & 0 & 0 \\ -2 & 0 & 0 & 0 \\ 0 & 0 & 0 & 200 \\ 0 & 0 & -200 & 0 \end{bmatrix} A is defined so that dx =...
  14. L

    Pole-Zero Plot and ROC for LTI System

    1.) Find the poles and zeros of H. They will be easy to see if you multiply the top and bottom by z. 2.) Find how stability and causality relate to ROC of your plot. Stability is related to the unit circle and causality is related to inside or outside of the extreme poles. 3.) Draw a...
  15. L

    MATLAB Plotting Two First Order ODEs and Two Second Order ODEs

    If you have two vectors x and y, you do plot(x,y). If you have two rows of a matrix Y, you do plot(Y(1,:),Y(2,:)) to plot the first row on the x-axis and the second on the y-axis. Similarly, if you have a matrix with two columns, you use plot(Y(:,1),Y(:,2)). Y(i,j) is the element in the i-th...
Back
Top