Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help with MATLAB problem

  1. Feb 4, 2014 #1

    I've figured out the first part, (a), it's the second part (b) that's confusing- I've tried re-arranging the plot() function and also tinkering with y1 and y2 rather than y(t), as I get the error:

    "Subscript indices must either be real positive integers or logicals."

    Any help or advice?
  2. jcsd
  3. Feb 5, 2014 #2
  4. Feb 5, 2014 #3


    User Avatar
    Gold Member

    y(t) is functional notation in mathematics. In MATLAB, y(t) means the t-th element in y. In this case t is even a vector of (noninteger) values, so you end up telling MATLAB you want to look at y(0.05), which doesn't make sense since y doesnt have a 0.05th element, only a 1st, 2nd, etc... So just define y = instead of y(t) = .

    I'll get you started..
    y = exp(-t./2).*exp(-2*t);
    x = ...
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Help MATLAB problem Date
Help in Matlab problem ! Dec 29, 2012
Seek Matlab Help in this problem Feb 11, 2012
A problem with MATLAB - please help Apr 29, 2010
Matlab help with design problem Apr 27, 2005
Matlab help with a design problem Apr 27, 2005