Help with MATLAB problem

  • #1
http://i.snag.gy/FBeLq.jpg

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?
 

Answers and Replies

  • #3
kreil
Insights Author
Gold Member
668
67
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 = ...
plot(t,x)
 

Related Threads on Help with MATLAB problem

Replies
2
Views
5K
Replies
4
Views
2K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
3
Views
8K
Replies
2
Views
2K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
1
Views
2K
Replies
2
Views
2K
Replies
2
Views
2K
Top