کد متلب (MATLAB) : مثال شماره 24
کدهای متلب :
clear all
close all
clc
Y = [7 6 5
6 8 1
4 5 9
2 3 4
9 7 2 ] ;
subplot(2,2,1)
bar(Y)
title ('bar (...," grouped ")')
subplot(2,2,2)
bar(0:5:20,Y)
title('bar(... ."grouped")')
subplot(2,2,3)
bar(Y,'stacked')
title('bar(..., "stacked'')')
subplot(2,2,4)
barh(Y)
title('barn')
close all
clc
Y = [7 6 5
6 8 1
4 5 9
2 3 4
9 7 2 ] ;
subplot(2,2,1)
bar(Y)
title ('bar (...," grouped ")')
subplot(2,2,2)
bar(0:5:20,Y)
title('bar(... ."grouped")')
subplot(2,2,3)
bar(Y,'stacked')
title('bar(..., "stacked'')')
subplot(2,2,4)
barh(Y)
title('barn')
نتیجه :

منبع کدها :
کتاب MATLAB Guide - D.J. Higham - second edition - صفحه 111 از فایل pdf کتاب
دسته بندی انواع رسم شکل در متلب
نظرات 0 0 0