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

3 次查看(过去 30 天)
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:)

采纳的回答

madhan ravi
madhan ravi 2020-5-23
MAX = max(bx,cy)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by