How does Matlab work?

1 次查看(过去 30 天)
Max Behr
Max Behr 2020-5-17
Hello,
I would like to do this operation:
maxi=max(a,[],'all')
mini=min(a,[],'all')
a=(a-mini)/(maxi-mini)
maxi=max(b,[],'all')
mic=min(b,[],'all')
b=(b-mini)/(maxi-mini)
If I enter this code in matlab will Matlab do this ?
Maximum of a=> maxi
Minimum of a=> mini
Recalculate every value of a by subtracting -mini from i and dividing it by (maxi minus mini).
Maximum of b=> maxi
Minimum of b=> mini
Recalculate every value of b by subtracting -mini from i and dividing it by (maxi minus mini).
So matlab wouldn't mix up the order and will do everything one after another?
Thanks for your help!
  2 个评论
Stephen23
Stephen23 2020-5-17
Why not just try it and find out?
Max Behr
Max Behr 2020-5-17
I am afraid of killing the complete file/system :)

请先登录,再进行评论。

采纳的回答

Ameer Hamza
Ameer Hamza 2020-5-17
编辑:Ameer Hamza 2020-5-18
No, MATLAB will not mix up the order. Also, MATLAB is interpreted language, so everything is executed in the order you have written.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by