필터 지우기
필터 지우기

I need to create a formula but im not sure how to do it with the infor given

조회 수: 1 (최근 30일)
So my inital problem is that I need to use an array of tables which imported into matlab, however I need to use the length and the height of a ramp to determine the angle measurement of the ramp, and by doing this i need to create a funcution that accepts the Height and length as inputs and outputs the results. If anyone could help guide me through this, please feel free to answer with a couple of tips.
image provided to better understand the problem:
the parts scribbled out is the parts ive already completed. I dont really need so much help on 5-6 but i do need help on 3 through 4.
  댓글 수: 1
DGM
DGM 2021년 10월 31일
A simple function template:
function theresult = myfunctionname(argument1,argument2)
% the first contiguous block of commented lines is treated as
% the synopsis and constitutes the text returned when you
% call help on your function.
theresult = %... (some trig)
end
look up atan2d and atand

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

채택된 답변

Walter Roberson
Walter Roberson 2021년 10월 31일
You are given input information that is height and hypotenuse length, and you are asked to find angle.
sin(theta) = opposite / hypotenuse
cos(theta) = adjacent / hypotenuse
tan(theta) = opposite / adjacent
Length of the ramp is hypotenuse, height of the ramp is... which, opposite or adjacent?
If you had both right hand side values of one of those lines, how would you calculate the angle ?
  댓글 수: 2
JMK
JMK 2021년 10월 31일
I do I just didnt know how i would incorperate that into an equation, thank you for the help I hope it works fingers crossed
Walter Roberson
Walter Roberson 2021년 10월 31일
output = ArchTrigFunction(A./B)
with appropriate A, B, ArchTrigFunction

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by