Engineering Questions: MATLAB


Problem 1

Write a MATLAB function that plots the following polynomial. 𝑦 = 3π‘₯ 3 + 2π‘₯ 2 βˆ’ 3π‘₯ + 1 Name your function π‘π‘œπ‘™π‘¦π‘ƒπ‘™π‘œπ‘‘. This function should have one output that represents the 𝑦 values. The input to this function should be the π‘₯ values on the interval [-10, 10] as a vector.

Problem 2

Do problem 1 again but instead of a function definition use an anonymous function (Read section 6.4). This should be a script file rather than a function file.

Problem 3

Redo problem 2 on homework 5 for the log plot. Create a function on MATLAB that generalizes the script for different input parameters. The inputs to your function should be the resistance, capacitance, and inductance. Leave the frequency πœ” on the same range. Make sure the function plots the transfer function. Your function should have the following structure: function voltage_ratio = transferFunct(resistor,inductor,capacitor) Test your function with the following inputs 𝑅 = 200Ξ© 𝐿 = 8 π‘šπ» 𝐢 = 5πœ‡πΉ Problem 4 Redo

Problem 4 from homework 5 using anonymous functions for π‘₯(𝑑), 𝑦(𝑑), and 𝑧(𝑑).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: