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

2 visualizzazioni (ultimi 30 giorni)
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:)

Risposta accettata

madhan ravi
madhan ravi il 23 Mag 2020
MAX = max(bx,cy)

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by