In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you what are the common functions of Matlab, I hope you have something to gain after reading this article, let's discuss it together!
Here, as a note, record some operations that you often use but are easy to forget when using Matlab.
1. Read the alpha value of the picture
[im, ~, alpha] = imread (filename)
Note: if the file does not have a transparency attribute, the read alpha is empty
two。 Save figure Picture
Print (figure_handle, fileformat, filename)
3. Save transparent pictures
Imwrite (im, filename, 'Alpha', alpha)
4. Show transparent pictures
[im, ~, alpha] = imread ('im.png'); h = imshow (im); set
If you do not set alpha, the figure display is a white background.
5.colormap use (incompatible with C++ opencv)
Imwrite (im, colormap, filename)
6. Multiple rounding methods
Fix- rounding to zero floor- rounding to negative infinity ceil- to positive infinity round- rounding to the nearest integer, rounded
7.mask is displayed translucently on the original image.
Imshowpair (im, mask, 'blend')
8. Three-dimensional matrix
A=ones (h, w, c); for i=1:c_num A (:,:, I) = ones (h, w); end
9. Create new matrices and vectors
Zeros (m, m, n, … , classname) ones (m < n, … , classname)
Note: the data type is specified by classname. Its data type can be: duoble, single, int8, uint8, int16, uint16, int32, uint32
10. Save mat
Save (fullfile, 'variable'); after reading this article, I believe you have a certain understanding of "what are the common functions of Matlab". If you want to know more about it, welcome to follow the industry information channel, thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.