Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please solve the error in matlab For the triangle shown below, which has side lengths a, b and c and interior angle between the sides

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

please solve the error in matlab

For the triangle shown below, which has side lengths a, b and c and interior angle between the sides with lengths a and b, the cosine law says: b (I c? = a + b2 2ab cos Write a MATLAB function called angles that takes the lengths of three sides of a triangle as arguments and returns the three interior angles of the triangle. For example; >>angles (1, 2, V3) should return (approximately) 30, 60 and 90 degree. Note: The outputs should be in degrees. The order of the outputs does not matter. 1 function (alfa, beta, theta]=angle(a,b,c) 2 3 angalfa acos((a^2+b^2-c^2)/(2*a*b)); 4 angbeta acosd((b^2+c^2-a^2)/(2*b*c)); 5 angtheta acosd((c^2+a^2-b^2)/(2*c*a)); 6 7 end Code to call your function C Reset 1 [alfa, beta, theta)=angle(1,2,sqrt(3)) Output Output argument "alfa" (and maybe others) not assigned during call to "angle

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

Step: 3

blur-text-image

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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290