I need some help please!

조회 수: 9 (최근 30일)
Daniel Vonderhaar
Daniel Vonderhaar 2021년 6월 7일
댓글: Walter Roberson 2021년 6월 20일
Hello!
I got this as an exsample, but I dont know how to get the solution for these questions. Would one of you please help?
  댓글 수: 4
David Hill
David Hill 2021년 6월 7일
James Tursa
James Tursa 2021년 6월 7일
You plug in the known numbers and then solve the equation for the remaining unknown.

댓글을 달려면 로그인하십시오.

채택된 답변

Daniel Vonderhaar
Daniel Vonderhaar 2021년 6월 20일
I figured it out!
%% Part 1
a=21;
b=45;
c=60;
%Human Steps
%60^2=21^2+45^2-2(21)(45)cos(y);
%3600=2466-1890cos(Y);
%1134=-1890cos(y);
%Y= 126.87;
%Computer Steps
%c^2=a^2+b^2-2*a*b*cosd(gamma)
%c^2-a^2=b^22*a*b*cosd(gamma)
%c^2-a^2-b^2=-2*a*b*cosd(gamma)
%(c^2-a^2-b^2)/(-2*a*b)=cosd(gamma)
%cosd(gamma)=(c^2-a^2-b^2)/(-2*a*b)
%acosd(cosd(gamma))=acosd((c^2-a^2-b^2)/(-2*a*b))
gamma=acosd((c^2-a^2-b^2)/(-2*a*b))
%% Part 2
%b/sind(beta)=c/sind(gamma)
%b=(c*/sind(gamma))*sind(beta)
%b*(sind(gamma)/c)=sind(beta)
%sind(beta)=b*(sind(gamma)/c)
%asind(sind(beta))=asind(b*(sind(gamma)/c))
%beta=asind(b*(sind(gamma)/c))
beta=asind(b*(sind(gamma)/c))
%a/sind(alpha)=b/sind(beta)
%a=(b*/sind(beta))*sind(alpha)
%a*(sind(beta)/b)=sind(alpha)
%sind(alpha)=a*(sind(beta)/b)
%asind(sind(alpha))=asind(a*(sind(beta)/b))
%alpha=asind(a*(sind(gamma)/b))
alpha=asind(a*(sind(beta)/b))
%% Part 3
Vertification=alpha+beta+gamma
solve_gamma=180-alpha-beta
solve_beta=180-gamma-alpha
solve_alpha=180-gamma-beta
disp [This is correct]
  댓글 수: 2
John D'Errico
John D'Errico 2021년 6월 20일
LOL. Usually, we don't encourage people to answer questions posted with no effort shown by the student. But since you answered your own question. I guess that is ok. :)
If I can offer some getting started advice...
You used the variables alpha, beta, gamma. And while they may seem perfectly valid variable names, at the same time, they are also MATLAB functions, every one of them. At this point in your career, you won't be using the gamma or beta functions. But one day you may need to do so. ANd alpha is a graphics utility. Try this:
help alpha
help beta
help gamma
In each case, you will find functions in MATLAB that MAY come in quite handy one day.
A good idea when you use a variable name that seems like a common word, you might check to see if it already exists as a function in MATLAB.
Walter Roberson
Walter Roberson 2021년 6월 20일
In practice, using alpha tends to cause problems: it is a common failure to encounter a point in a program where alpha has not been defined, and then to have MATLAB error with a confusing error message when alpha gets used. For example,
bx = x.^(1-alpha)
with alpha not having been defined as a variable, will generate an error about "Too many output arguments".
If beta or gamma are used in the same kind of circumstances, the error is instead about "Not enough input arguments" which tends to be easier to understand.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by