Matalb related sub-method, Case study: Correlation analysis of food and beverage sales data

Source: Internet
Author: User
Percent of food sales data correlation analysis clear;% initialization parameters Catering_sale = '. /data/catering_sale_all.xls '; % dining data, containing other attributes index = 1; % of sales data in the column is read in data [num,txt] = Xlsread (catering_sale);% read num%% correlation analysis corr_ = Corr (num);%corr_= linear dependent (num) percent print result rows = Size (co rr_,1);% rows = Fetch Length (corr_, count rows)    for i=2:rows%    the correlation coefficients of the loop variable i=2 to ten disp ([' "' txt{1,2} '" and "' Txt{1,1+i} ') are: ' Num2str ( Corr_ (i,1)]); end% printing [steamed chicken claw in lily Sauce] and other menu related factors are: corr_ (i,1) disp (' Food and beverage products daily sales correlation analysis completed! ‘);

The results show:

The correlation coefficient of "steamed chicken claw with lily sauce" and "steamed fragrant dumplings with emerald" is: 0.0092058
The correlation coefficient of "steamed chicken claw with lily sauce" and "steamed ribs with garlic sauce" is: 0.016799
The correlation coefficient of "steamed chicken claw with lily sauce" and "true Flavor Chicken" is: 0.45564
The correlation coefficients of "steamed chicken claw with lily sauce" and "Honey Juice Baked Package" are: NaN
The correlation coefficient of "steamed chicken claw with lily sauce" and "raw stir-frying Heart" is: 0.3085
"Steamed chicken claw with lily sauce" and "hot plate pickled cabbage tofu" correlation coefficient is: 0.2049
The correlation coefficient of "steamed chicken claw with lily sauce" and "fried leek dumplings" is: 0.12745
The correlation coefficient of "steamed chicken claw with lily sauce" and "Pan fried Cake" is:-0.090276
The correlation coefficient of "steamed chicken claw with lily sauce" and "Original Dish Heart" is: 0.42832
The correlation analysis of food and beverage daily Sales is complete!

Important syntax: Matlab Corr (data correlation)

Matalb related sub-method, Case study: Correlation analysis of food and beverage sales data

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.