کد متلب (MATLAB) : مثال شماره 12
کدهای متلب :
clear all
close all
clc
h = plot(magic(5));
prop_name(1) = {'Marker'};
prop_name(2) = {'MarkerFaceColor'};
prop_values(1,1) = {'s'};
prop_values(1,2) = {get(h(1),'Color')};
prop_values(2,1) = {'d'};
prop_values(2,2) = {get(h(2),'Color')};
prop_values(3,1) = {'o'};
prop_values(3,2) = {get(h(3),'Color')};
prop_values(4,1) = {'p'};
prop_values(4,2) = {get(h(4),'Color')};
prop_values(5,1) = {'h'};
prop_values(5,2) = {get(h(5),'Color')};
set(h,prop_name,prop_values)
close all
clc
h = plot(magic(5));
prop_name(1) = {'Marker'};
prop_name(2) = {'MarkerFaceColor'};
prop_values(1,1) = {'s'};
prop_values(1,2) = {get(h(1),'Color')};
prop_values(2,1) = {'d'};
prop_values(2,2) = {get(h(2),'Color')};
prop_values(3,1) = {'o'};
prop_values(3,2) = {get(h(3),'Color')};
prop_values(4,1) = {'p'};
prop_values(4,2) = {get(h(4),'Color')};
prop_values(5,1) = {'h'};
prop_values(5,2) = {get(h(5),'Color')};
set(h,prop_name,prop_values)
نتیجه :
منبع کدها :
کتاب MATLAB 7 Getting Started Guide - صفحه 138 از فایل pdf کتاب
دسته بندی
انواع رسم شکل در متلب
نظرات 0 0 0