Matlab Systems and Signals Problem [EE]

In summary, Matlab is a high-level programming language and interactive environment used for scientific and technical computing. It allows users to analyze and visualize data, develop algorithms, and create models and applications. Systems and signals in Matlab refer to the analysis and processing of signals in a system, and Matlab provides a variety of functions and tools for solving systems and signals problems. It is commonly used in fields such as audio and image processing, communication systems, and data analysis, and there are many resources available for learning more about its applications in systems and signals.
  • #1
gshu
1
0

Homework Statement



Questions
We ¯rst model the vocal tract by a simple second-order di®erential equation:
d2y(t)/dt2 + B1dy(t)/dt+ C1y(t) = A1x(t);
where A1 = 3:8469 £ 106, B1 = 325:6907, and C1 = 3:8469 . We denote
this system by H1. Here, t is in seconds.
Step 1.) Use MATLAB to compute and plot the impulse response h1(t) and the
unit step response g1(t) of H1.
Hints: use MATLAB's impulse and step functions.
1
For example, \Ts=1e-004; t=[0.0:Ts:0.1]; num1=[A1]; den1=[1 B1 C1];
sys1=tf(num1, den1); h1=impulse(sys1, t), figure; plot(t, h1)".
Step 2.) Assume the input x1(t) to H1 is given by
x1(t) =
1; when 0 <= t <= 5.0 * 10^-4;
0; otherwise:
(2)
Compute and plot the output y1(t) using MATLAB.
Hints: Create the input x1(t) by Ts=1e-004; x1=ones(5,1)", and then
compute the output by \y1=conv(x1, h1)*Ts


The Attempt at a Solution



I'm 99% sure I got Question 1 with the following MATLAB code:
A1 = 3.8469*10^6;
B1 = 325.6907;
C1 = 3.8469*10^6;

num = [ A1 ];
den = [ 1 B1 C1 ];

tfunct = tf(num, den);
Ts = 1e-004;
t =[0.0:Ts:0.1];
h1 = impulse(tfunct, t), figure;
plot(t, h1);

It works and I get a plot

-----
With question 2 I can't figure out how the hint is supposed to factor in the input x1(t). It somehow uses 'ones(5,1)', then conv( ones(5,1), h1); (where h1 is impulse from question 1).
The answer I get definitely doesn't seem right though. This is my attempt at it:

A1 = 3.8469*10^6;
B1 = 325.6907;
C1 = 3.8469*10^6;

num = [ A1 ];
den = [ 1 B1 C1 ];

tfunct = tf(num, den);

Ts = 1e-004;
x1 = ones(5,1);

t =[0.0:Ts:0.1];
h1 = impulse(tfunct, t);
y1 = (conv(x1, h1)*Ts);
figure;
plot(y1, t);

---------
I'm just really not sure how input with constraints is factored in through the 'ones' function. Any ideas??

Thanks
Greg
 
Physics news on Phys.org
  • #2



Hello Greg,

Thank you for sharing your code and for asking for help. It looks like you are on the right track with your solution for question 1. For question 2, the hint is suggesting that you create the input x1(t) using the 'ones' function and then use the 'conv' function to convolve it with the impulse response h1(t). This will give you the output y1(t). Here is a possible solution:

A1 = 3.8469*10^6;
B1 = 325.6907;
C1 = 3.8469*10^6;

num = [ A1 ];
den = [ 1 B1 C1 ];

tfunct = tf(num, den);

Ts = 1e-004;
t =[0.0:Ts:0.1];
h1 = impulse(tfunct, t);

x1 = ones(1, length(t));
x1(t>5e-4) = 0; % set values after 5e-4 to 0

y1 = conv(x1, h1)*Ts;

figure;
plot(t, y1);

I hope this helps. Let me know if you have any further questions.
 

1. What is Matlab?

Matlab is a high-level programming language and interactive environment designed for scientific and technical computing. It allows users to analyze and visualize data, develop algorithms, and create models and applications.

2. What are systems and signals in Matlab?

Systems and signals refer to the analysis and processing of signals in a system using Matlab. A system is a mathematical model that takes an input signal and produces an output signal. Signals are any physical quantity that varies over time, such as sound, images, or sensor readings.

3. How can I use Matlab to solve systems and signals problems?

Matlab provides a variety of functions and tools for solving systems and signals problems. These include built-in functions for signal processing, data analysis, and mathematical operations, as well as specialized toolboxes for specific applications. It also allows users to create custom algorithms and models using its programming language.

4. What are some common applications of Matlab in systems and signals?

Matlab is commonly used in a wide range of fields for systems and signals analysis and processing. Some examples include audio and image processing, communication systems, control systems, and data analysis in engineering, physics, and biology. It is also used for research and development in these and other fields.

5. How can I learn more about using Matlab for systems and signals?

There are many resources available for learning about Matlab and its applications in systems and signals. These include online tutorials, documentation and help forums provided by MathWorks (the company that develops Matlab), and books and courses offered by universities and training centers. You can also explore the numerous examples and demos included in the Matlab software itself.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
Back
Top