Summary
This explains the basics of making pretty bar plots in Matlab. The Matlab "bar" command is used, along with some nice scripts discovered on the Matlab file exchange.
Example
Suppose you have some experimental data from two strains (Strain 1 and Strain 2) under four different experiment conditions (Condition A,B,C,D). The means and standard deviations of your measurement of interest look like:
Strain1_Mean=[0.5137 3.2830 1.5887 5.9188];
Strain2_Mean=[0.4042 2.9884 0.5709 2.7766];
Strain1_std=[1.1393 2.8108 2.2203 3.5233];
Strain2_std=[0.8762 2.8478 0.9878 2.2197];
Use Matlab's bar command to plot this data (without error bars) as a bar chart:
bar([1 2 3 4],[Strain1_Mean' Strain2_Mean'])
legend('Strain 1','Strain 2')
pause; close all;
最后
以上就是羞涩心锁最近收集整理的关于bar用法 matlab,matlab bar的用法简介的全部内容,更多相关bar用法内容请搜索靠谱客的其他文章。
发表评论 取消回复