تبلیغات
مهندسی مکانیک و هوافضا - ترسیم نمودار در متلب - 1
هر آنچه که یک مهندس بخواهد اینجا هست!
 
آخرین مطالب
 
پیوندهای روزانه
ترسیم نمودار در متلب - 1

کدهای متلب :


clear all
close all
clc

x = [0 pi/4 3*pi/8 3*pi/4 pi]; y = sin(x);
xi = linspace(0,pi,40)';
yn = interp1(x,y,xi,'nearest');
yl = interp1(x,y,xi,'linear');
ys = interp1(x,y,xi,'spline');
yp = interp1(x,y,xi,'pchip');
xx = linspace(0,pi,50);
plot(xi,yn,'*', xi,yl,'+', xi,ys,'v', xi,yp,'o')
legend('nearest','linear','spline','pchip')
hold on
plot(xx,sin(xx),'-',x,y,'.k','MarkerSize',30)
set(gca,'XTick',x)set(gca,'XTickLabel','0|pi/4l3pi/8|3pi/4|pi')
set(gca,'XGrid','on')
axis([-0.25 3.5 -0.1 1.1])
hold off

نتیجه :

مثال شماره 17

منبع کدها :

کتاب MATLAB Guide - D.J. Higham - second edition - صفحه 163 از فایل pdf کتاب



مرتبط با: متلب ( MATLAB ) ,
می توانید دیدگاه خود را بنویسید
Посетить страницу شنبه 9 اردیبهشت 1396 08:52 ب.ظ
Hi there, simply turned into aware of your weblog thru Google,
and found that it's really informative. I'm gonna watch out for brussels.
I will be grateful should you continue this in future. Numerous
other people can be benefited out of your writing.
Cheers!
manicure سه شنبه 5 اردیبهشت 1396 05:37 ب.ظ
Hi! I know this is kinda off topic nevertheless I'd figured
I'd ask. Would you be interested in trading links
or maybe guest authoring a blog post or vice-versa? My website discusses a lot of the same subjects as yours and I believe we
could greatly benefit from each other. If you happen to be interested feel free to
send me an e-mail. I look forward to hearing from you!
Great blog by the way!
manicure شنبه 2 اردیبهشت 1396 11:58 ب.ظ
Whats up this is somewhat of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML.

I'm starting a blog soon but have no coding experience so I wanted to get
advice from someone with experience. Any help would be enormously
appreciated!
manicure شنبه 2 اردیبهشت 1396 04:59 ب.ظ
Hi, its good post on the topic of media print, we all
be familiar with media is a great source of information.
BHW شنبه 26 فروردین 1396 09:56 ق.ظ
I am curious to find out what blog platform you are using?

I'm having some minor security problems with my latest website
and I would like to find something more safeguarded. Do you have any suggestions?
manicure چهارشنبه 23 فروردین 1396 10:03 ب.ظ
I'm not sure exactly why but this site is loading very slow for me.

Is anyone else having this problem or is it a problem
on my end? I'll check back later and see if the problem still exists.
 
لبخندناراحتچشمک
نیشخندبغلسوال
قلبخجالتزبان
ماچتعجبعصبانی
عینکشیطانگریه
خندهقهقههخداحافظ
سبزقهرهورا
دستگلتفکر