Homework, MATLAB Programming

Assignment Help:
-The program should run always until the user enters -1 to exit from the program.
- In the main, you should ask user to input any angles in degrees (Ad) and an integer number (N).
- In the main, you should check that n is a positive integer.
-Write a function (DtoR) to convert any angle from degrees Ad to radian Ar.
-Write function (fact) to calculate the factorial of any number and return the value.
-Write a function (sinus) that accepts two parameters (angle, number of elements), calls any
needed function, and returns the sinus value for Ad. The angles variable Ad could be scalar or
vector.
- In the main, you should call a user defined function (sinus) by passing the angle (Ad) and
number of elements (N) that should be included in the sum.
-In the main, you should print the angle in degrees, the equivalent angle in radians and the sinus
value for this angle.

Related Discussions:- Homework

Identify an equation that describes some chemical process, 1) Identify an e...

1) Identify an equation that describes some chemical process.  Your equation should have at least two parameters, at least one of which should contribute in a non-linear way. He

Implement code to determine the frequency components, Objectives In the ...

Objectives In the following exercises, students are required ?rstly to implement code to determine the frequency components present in a signal, and then to extract a desired si

Singal system , Q.1: Consider the transmission of a sinusoid x(t) = cos(2f...

Q.1: Consider the transmission of a sinusoid x(t) = cos(2f0t) through a channel a ected by multipath and Doppler. Let there be two paths, and assume the sinusoid is being sent fro

Characters and encoding, Characters and Encoding: A character in a MAT...

Characters and Encoding: A character in a MATLAB is represented by using single quotes (example, 'a' or 'x'). The quotes are essential to denote a character; without them, the

Compute the sum of all the columns of a matrix, 1. Enter the 3×4 matrix ...

1. Enter the 3×4 matrix Let a ij denote the entry of A in the ith row and jth column. Use Matlab to compute the following : (a) a 13 + a 32 (b) Three times the

Discuss the frequency range and radiation angles, Discuss the frequency ran...

Discuss the frequency range / radiation angles at which the two models diverge, and relate this divergence to your understanding of the behaviour of a pistonic source. Compare t

Illustration of input function, Illustration of Input function: For il...

Illustration of Input function: For illustration, >> rad = input('Enter the radius: ') Enter the radius: 5 rad = 5 If character or string input is preferred, 's' s

Generates sin or cos wave using plot functions, Generates sin or cos wave u...

Generates sin or cos wave using plot functions: The script generates an x vector; iterating through all the values from 0 to 2*π in steps of 2*π /40 gives sufficient points to

Illustrations of if statement, Illustrations of if statement: illustra...

Illustrations of if statement: illustrations of running this script: >> sqrtifexamp Please enter a number: -4.2 The sqrt of 4.2 is 2.0 >> sqrtifexamp Please ent

Illustration of variable number of input arguments, Illustration of Variabl...

Illustration of Variable number of input arguments: In this situation, it was supposed that the radius will always be passed to the function. The function header can hence be

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd