How can I make my script decide which scalar of two variables is larger?

3 views (last 30 days)
Hello,
I have this code, and what I need to do is multiply the number of tiles that I imput by the largest value that have been imput by either bx or cy. So, for example, if I have bx=5 and cy=10, I want my code to decide in the radius of the circle that the varibale that must be multiply is cy because it's larger. Does that make sense? Is that something that can be done?
bx=whatever
cy=whatever
ntiles=whatever
xcircle=0
ycircle=0
r=ntiles* %Here I would need the script to decide whether bx or cy
% must be multiplied by the number of tiles depending on the value
% that I have previously given to each variable
th = 0:pi/50:2*pi;
AA = r * cos(th) + xcircle;
BB = r * sin(th) + ycircle;
h = plot(AA, BB)
Thank you very much:)

Accepted Answer

madhan ravi
madhan ravi on 23 May 2020
MAX = max(bx,cy)

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!