# 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 𝑧(𝑡).

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