150 likes | 506 Views
Using MathCAD. SCC Spring-08 Electronic Technology Wang Ng x-2638 ngw@scc.losrios.edu. Overview. About MathCAD Using MathCAD as an interactive calculator Using MathCAD with formulas Equation solver Convenient features Advanced features Example : AC calculations Conclusion.
E N D
Using MathCAD SCC Spring-08 Electronic Technology Wang Ng x-2638 ngw@scc.losrios.edu
Overview • About MathCAD • Using MathCAD as an interactive calculator • Using MathCAD with formulas • Equation solver • Convenient features • Advanced features • Example : AC calculations • Conclusion
General features • MathCAD • WYSIWYG • K to 4-year College level. • Simple, easy to use. • Not intended for heavy-duty number crunching. • MatLab • Programming style. • Up to M.S. level • Extensive training required. • Suitable for heavy-duty number crunching.
Calculator Mode • The Calculator Tool Bar • The “=“ key (It is the output command) • Examples: • 1+1=2 1/3=0.333 • sin(1)=0.841 sin(1deg)=0.017 • 1mi=1931m 1mi=6336ft • Interactive: just edit the numbers • sin(45deg)=0.707
Complex Calculations • Use i or j for the imaginary part • (5+3j)+(2-4j)= (5+3j)-(2-4j)= • (5+3j)*(2-4j)= (5+3j)/(2-4j)= • (5+3j)^2= = • Polar/Rectangularconversion: • |5+3j|= • arg(5+3j)= (type deg) • 2e^45j*deg= • “j” can be placed in front by typing: 1j*45deg
Formulas • You need to provide data: use the “:” key as the input command (it will look like :=). • Then you need to enter the formula. • Use the “=“ key to obtain the result. • Example: Enter the followings • E:3V • R:2 • I:E/R • I=
Equation solver Find(x,y,...) Solves a system of equations. Minerr(x,y,...) Approximate solution to a system of equations. root(f(x),x,a,b) Solves one equation in one unknown. lsolve(M,v) Solves a system of linear equations. polyroots(v) Solves for the roots of the polynomial whose coefficients are in v.
Convenient features • Use the worksheet as handouts. • Specify the unit of the results. • Change the input data and the results will be updated automatically. Note: Data must be placed above formulas. • Many built-in functions (root, …) • Comments can be entered after the “ key. • You can save the worksheet. • Resource center: Tutorials, quick sheets, …
Advanced features • Symbolic process: The symbolic menu bar • Examples: type x^2”space”-1”space” and then select “Factor” from the symbolic menu bar. • Graphs: see attached Bode Plot example. • Array and range variables: Use the “;” key. See attached example. • Programming: The programming menu bar has the basic programming commands. • Calculus, differential equations, matrices, optimization, statistics, …
Examples: RLC circuit impedance R1 R2 C2 L R3 C1
Conclusion MathCAD is a versatile teaching tool: • Calculation steps (formulas) • Demonstrate specific effects • Graphics • Exam/Homework problems • Partial credit • Course note