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

1 vue (au cours des 30 derniers jours)
Please help me convert this matlabe code to it's equivalent algorithm.
  2 commentaires
Walter Roberson
Walter Roberson le 23 Oct 2020
What properties would an "algorithm" have for your purposes? For example are you asking for it to be converted to a flow chart?
renit anthony
renit anthony le 23 Oct 2020
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

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by