In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces what the two output sentences of matlab are, which can be used for reference by interested friends. I hope you can learn a lot after reading this article.
There are two kinds of matlab output statements, which are: 1, free format, syntax such as "disp (23: 454-29: 4)"; 2, formatting output, syntax such as "fprintf ('The area is% 8.5f\ nwritten discipline area)".
Input and output statements of MATLAB
The input statement input function of 1.MATLAB is used to receive input from the user:
a. Input data
> > x=input ('please input a number:') please input a number:22x = 22
b. Input string
> > x=input ('please input a string:','s') please input a string:this is a stringx = this is a string
2.MATLAB output statements include free format (disp) and formatted output (fprintf).
> > disp (23: 454-29: 4) 361 > > disp ([11 22 33-44 55 66 X 77 88 99]) 11 22 33 44 55 66 77 88 99 > > disp ('this is a string') this is a string > > area=12.56637889 > > fprintf ('The area is% 8.5f\ nkeeper area) The area is 12.56638 > > Thank you for reading this article carefully. I hope the article "what are the two output sentences of matlab" shared by the editor will be helpful to everyone? at the same time, I also hope you can support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.