12-19-2013، 11:50 AM
clclc
clear all
close all
fprintf('\t\t (( In The Name Of God ))\n');
fprintf('\n\t\t\n');
fprintf('\n\t\t name\n');
a=input (' 1)line\n 2)hermit \n 3)bezeir\n 4)spline \n ................\n\n Plz Enter your choise; ');
switch(a)
case 1
d=input ('1)enter two points (a,b)&(c,d):\n 2)enter line equation & a point (perpendicular):\n 3)enter line equation & a point (parallel):\n 4)enter line equation & a ponit on the line(a,b)& angle:\n enter number:');
switch(d)
case{1}
syms x
fprintf('Please enter your two points \n\t\t');
p1=input('EX:[x y]\n p1=');
p2=input('EX:[x y]\n p2=');
m=(p1(2)-p2(2))/(p1(1)-p2(1));
y=p1(2)+m*(x-p1(1));
ezplot(y);
grid on
case{2}
syms x
fprintf('Please enter your constances y1 , m y= y1+mx \n\t\t');
f=input('[y1 m]\n constances=');
p=input('EX:[x y]\n p=');
y=f(1)+f(2)*x;
ezplot(y);
hold on
m=diff(y,'x');
m=-1/m;
y2=p(2)+m*(x-p(1));
ezplot(y2);
hold off
grid on
case{3}
syms x
clear all
close all
fprintf('\t\t (( In The Name Of God ))\n');
fprintf('\n\t\t\n');
fprintf('\n\t\t name\n');
a=input (' 1)line\n 2)hermit \n 3)bezeir\n 4)spline \n ................\n\n Plz Enter your choise; ');
switch(a)
case 1
d=input ('1)enter two points (a,b)&(c,d):\n 2)enter line equation & a point (perpendicular):\n 3)enter line equation & a point (parallel):\n 4)enter line equation & a ponit on the line(a,b)& angle:\n enter number:');
switch(d)
case{1}
syms x
fprintf('Please enter your two points \n\t\t');
p1=input('EX:[x y]\n p1=');
p2=input('EX:[x y]\n p2=');
m=(p1(2)-p2(2))/(p1(1)-p2(1));
y=p1(2)+m*(x-p1(1));
ezplot(y);
grid on
case{2}
syms x
fprintf('Please enter your constances y1 , m y= y1+mx \n\t\t');
f=input('[y1 m]\n constances=');
p=input('EX:[x y]\n p=');
y=f(1)+f(2)*x;
ezplot(y);
hold on
m=diff(y,'x');
m=-1/m;
y2=p(2)+m*(x-p(1));
ezplot(y2);
hold off
grid on
case{3}
syms x
نوشتن انواع خط با متلب و منحنی های هرمیت بیزر و اسپی لین و رسم انواع خط
کاربر مهمان نمیتواند مطالب قیمتگذاری شده را خریداری کند. برای خرید مطالب قیمتگذاری شده، وارد شوید یا ثبت نام کنید .
خوبی چو از حد بگذرد نادان خیال بد کند.