Can someone write equivalent algorithm for these codes. I really need help with these.

Please help me convert this matlabe code to it's equivalent algorithm.

댓글 수: 2

What properties would an "algorithm" have for your purposes? For example are you asking for it to be converted to a flow chart?
No. Like a pseudo code. For example, Binary search:
Procedure binary_search
A ← sorted array
n ← size of array
x ← value to be searched
t lowerBound = 1
Set upperBound = n
while x not found
if upperBound < lowerBound
EXIT
: x does not exists
set midPoint = lowerBound + ( upperBound - lowerBound ) / 2
if A[midPoint] < x
set lowerBound = midPoint + 1
if A[midPoint] > x
set upperBound = midPoint - 1
if A[midPoint] = x
EXIT
: x found at location midPoint
end while
end procedure

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Convert Image Type에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

2020년 10월 23일

댓글:

2020년 10월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by