مثال های کدنویسی متلب (MATLAB)
دسته بندی ( ۳۳ آموزش )
نمایش دسته بندی ها (۳۳ آموزش)

کد متلب (MATLAB) : مثال شماره 6

کدهای متلب :


clear all
close all
clc

% Script prepared by D. T. Valentine - September 2006.
%
% The question raised is: What range of angles, i.e.
% which of the four quadrants of the circle from 0 to
% 2*pi are the angular outputs of each of the functions?
%
% Determine the values of x to be examined:
%
x = -1:0.001:1;
%
% Compute the arc-functions:
%
y1 = acos(x);
y2 = asin(x);
y3 = atan(x);
%
% Convert the angles from radians to degrees:
%
y1 = 180*y1/pi;
y2 = 180*y2/pi;
y3 = 180*y3/pi;
%
% Plot the results:
%
plot(y1,x,y2,x,y3,x),grid,legend('asin(x)', 'acos(x)', 'atan(x)')
xlabel('\theta in degrees'),ylabel('x, the argument of the function')
%
% REMARKS: Note the following:
% (1) The acos(x) varies from 0 to 90 to 180 degrees.
% (2) The asin(x) varies from -90 to 0 to 90 degrees.
% (3) The atan(x) varies from -45 to 0 to 45 degrees.
%
% Stop

نتیجه :

کد متلب (MATLAB) : مثال شماره 6

منبع کدها :

کتاب Essential MATLAB for Engineers and Scientists - صفحه 130 از فایل pdf کتاب

نویسنده علیرضا گلمکانی
شماره کلید 2292
گزینه ها
به اشتراک گذاری (Share) در شبکه های اجتماعی
نظرات 0 0 0

ارسال نظر جدید (بدون نیاز به عضو بودن در وب سایت)

جستجو در کلیدستان، توسط گوگل

جستجو در عنوان کلیدها

دسترسی سریع

کلید
×

شماره کلید


دسته بندی
×

شماره دسته کلید


جستجو
×

جستجو