USING MATLAB AND CREATING A USER-DEFINED FUNCTION
Here's a very particular function x(t) that came up recently. sin(50mt) x(t) = πί Create a function x=sintt25(t). Define the function to have a single input vector t and output a single output vector x, implementing the function above using a for loop to create each element. %paste in definition from your sintt25.m file %within the loop, use this to avoid trouble at sinx/x if t(i)==0 t(i)=1e-6; favoid sinx/x issue at 0 end
Here's a very particular function x(t) that came up recently. sin(50mt) x(t) = πί Create a function x=sintt25(t). Define
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Here's a very particular function x(t) that came up recently. sin(50mt) x(t) = πί Create a function x=sintt25(t). Define
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!