Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hi i have the script made ( shown below) i only need the (addition) part implemented into the scrip. the ADDITION specification in black letters

hi i have the script made ( shown below) i only need the (addition) part implemented into the scrip. the ADDITION specification in black letters shown in the picture. thank you

image text in transcribed

prompt = 'Enter time constant in seconds : '; tau = input(prompt);

prompt = ' Enter frequency in radians per second : '; theta = input(prompt);

prompt = ' Enter initial time in seconds : '; t0 = input(prompt);

prompt = 'Enter final time in seconds : '; tf = input(prompt);

prompt = 'number of divisions into which the range of time is to be divided : '; steps = input(prompt);

range = linspace(t0,tf,steps); V = zeros(1,steps);

for i = 1:steps V(i) = exp(-range(i)/tau) * cos(theta * range(i)); end

fprintf(1,'%f\t%f ', [range(:),V(:)]');

(30 Points) Design a MATLAB script to tabulate values for the function e t/T 6t, a common type of voltage response in electric circuits. The user should be cos asked to enter the following parameters: t-time constant in seconds e frequency in radians per second to initial time in seconds tf -final time in seconds Steps-number of divisions into which the range of time is to be divided The program should print a statement similar to the following: Calculations of the equation e (-t/x.xxx) cos (x.xxxt) from x.xxx to x xxx seconds The program should calculate the value of VIvoltage for the stated values of T and e over the range of time from to to tr. The results should be printed in a neatly formatted table showing both time and voltage. ADDITION: If the frequency entered is above 90 degrees, or less than zero, display an error and do not compute any voltage values. If the time constant is greater than the final time, display an error and do not compute any voltage values. Last, if the step computed using the initial and final times is less than 1 second, display an error and do not compute any voltage values

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

Explain the chemical properties of acids with examples.

Answered: 1 week ago

Question

Write the properties of Group theory.

Answered: 1 week ago