Thursday, March 14, 2013

Lab 4: FreeMat

Introduction:
FreeMath is a software application which helps students deal with the vector, matrix, or sinusoidal function easier. In this lab, we are going to study the general overview of some the functionality of MATLAB, and then we are going to study more deeply some specific function relative to electrical engineering to help us be success in the course.

Exercise 1:
We created a row vector, named x, and the initial and final point. Then use FreeMat to calculate y = sin(x).

 We can see the results in the picture. The results perfectly make sense.

Exercise 2:
This exercise helps students how to plot a function in MATLAB. We can plot multiple graphs in the Figure Window. Here is an example of sine and cosine graph.

Exercise 3:
Solving simultaneous equation with MATLAB. 
in this exercise, we are doing the assignment in which given the circuit below with V1 = 15V, V2 = 7V, R1 = 20Ω, R2 = 5Ω, R3 = 10Ω. Find the current through R3 .
Here is the answer:
I3= - 0.1857 A


Exercise 4: Plotting exponential graph.
In this exercise, we doing the assignment which given 2 circuit with the time constants are 100ms and 200ms. The output is 2e-t/Ʈ. Using MATLAB, plot the two outputs.

 The circuit has a time constant is 100ms has the lowest output sooner. 

The circuit is redesigned, so the output is now 2(1-et/ Ʈ).  Plot the output of both circuits.


Exercise 5: Adding sinusoids
Given two sinusoids: 3sin(2t + 10) and 5cos(2t -30). Determine what the output would be when adding them and plot the output.


Now, repeat this with the output frequency at 10Hz.
The script to implement.
 
The two sinusoids at 10Hz and the output.


The output itself. 

No comments:

Post a Comment