3.) Write a Scilab script that will calculate the following:
Suppose you know the lengths and the angle (in degrees) between two adjacent sides of a triangle. You can find the area of the triangle using the following relationship: TriArea = 1⁄2 * a * b * sin(x)
Have the user input a vector in the form of [a, b, angle x] in units of feet.
Calculate the area of the triangle (Use the correct Scilab function for this).
Display the area of the triangle in units of square feet.
data=input('Enter a vector in the form of [a, b, angle x] in units of feet: '); TriArea=.5*data(1)*data(2)*sind(data(3)); mprintf("Area of triangle: %.4f sq. feet\n",TriArea)

3.) Write a Scilab script that will calculate the following: Suppose you know the lengths...
This question is from the textbook "Python for ArcGIS" by Laura Tateosian: Write a script "triangles.py" that takes three arguments, the lengths of three sides of a triangle. Then define the following three functions: 1. perimeter takes three side lengths as arguments and returns the perimeter length. 2. triangleType takes three side lengths as arguments, determines if it is an equilateral triangle, an isosceles triangle, or neither. The result is returned. 3. area takes three side lengths as arguments and...
MATLAB question
Triangle Calculations (script with two anon functions) 0 solutions submitted (max: Unlimited) Consider a general triangle with side lengths a, b, and c and angles A, B, and C as shown below Write a script that does the following Define the following two anonymous functions and assign to the indicated Function Handles: 1. The function ThirdSide should accept the lengths of sides a and b as well as angle C in that order and use the Law of...
3. Write a program to calculate the area of a triangle. Your program will take the length of two sides and the included angle (in degrees), then prints the area based on the following formula. A = 1/2 ab sin C
Please use Matlab to solve and show your full codes
Write a script file Ask the user to enter sides of a triangle: a, b, c Check to see if the sides are all greater than 0 If they are: Use the function (triangle) that you created in your last homework problem (HW#5 problemttF) to calculate the area. command Display the results on the screen using fprintf write the results to disk using the fprintf command. If any of the...
For this homework you will be creating functions in SciLab. You will turn in electronically, each of the functions requested below. Part Problem Statement: Create a function called Projectile that will give you the X and Y location of an object while in flight. The cquations for the X and Y locations are given below function [X, Y]= Projectile (Velocity, Angle, Gravity) Input variables: Velocity velocity in units of m/sec Angle angle of the launcher from 0 to 90 Degrees...
Write a program to compute the area of a triangle using side-angle-side method and reports the area of that triangle (rounded to 2 decimal places). Side-angle-side formula: ???? = 1/ 2 ?? sin(?), where a and b are two sides of the triangle, and C is the included angle. Your program must meet the following criteria to receive full marks: • Randomly generate two values between 5 and 10 (inclusive) for two sides a and b of the triangle, respectively....
IN C++ You are to write a program which will get the following variables from the user. Length, Width, Height, Radius, Base. You should also have variables for Pi as 3.14 and choice1 and choice2. Your program will first ask the following: Press 1 to calculate Area Press 2 to calculate Perimeter The choice will be saved in choice1. You should then ask another choice: Press 1 for Rectangle Press 2 for Triangle Press 3 for Circle You have all...
3. (40 Pts.) Write a script which takes the frequency, amplitude and type (sinusoidal, square or triangular) of a function as input from user and plots the function y(t) at output. Hint: In MATLAB, you can generate a sinusoidal function by using "sin", a square function by using "square" and a triangular function by using "sawtooth" functions. User-inputs Select any frequency within the interval FE lkHz, 100 kHz , select the amplitude of the signal "VM" and define the time...
Please answer 1c, use MATLAB, and paste your entire script in
your answer so that I can copy and paste to see if it works.
Problem #1 400g triangle square pentagon hexagon Figure 1 For a closed geometric figure composed of straight lines (Figure 1), the interior angles in the figure must add to (n-2)(180) where n is the number of sides. Required Tasks a) Write a script that prompts the user to select from one of the following shapes:...
Write a MATLAB script, which asks the user to input the angle xd (in deg) and then approximates sine of the angle using the first 5 terms of Taylor series as follows: n+12n-1 sin n-1 (2n-1)! 1 Note that x in Taylor's equation is in radian, so make sure to do the conversion first Start with defining the vector n=1:5 and then use element-wise operation and basic MATLAB commands to calculate the summation. To calculate the factorial of any number,...