Создать функцию пользователя y=sinh(x)+sin(x)-1

Лабораторная работа

Информатика, кибернетика и программирование

Создать функцию пользователя y=sinhxsinx1 вычислить значения в точке x0=31 и построить график функции в интервале [2;5] с шагом 01.2 График заданной функции Вывод: Создали функцию пользователя вычислили значение функции в точке x0=31 где у=10. Построили график функции при заданных интервалах рис.



38.97 KB

2 чел.




Кафедра КЭЭМ

Лабораторная работа №1

По дисциплине «Специальные методы численного анализа»

Вариант 3

Выполнил студент гр.442

Голинько А.А.


преподаватель Чевын М.А.


Севастополь, 2012

Год поступления


Задание 1

Создать функцию пользователя y=sinh(x)+sin(x)-1 вычислить значения в точке x0=3,1 и построить график функции в интервале [-2;5] с шагом 0,1.


Представим данную функцию в m=file (рис.1).

Рис.1 «Функция m-file»

Далее переходим в Matlab (Command Window)

>> z=haf(3.1)

z = 10.11803170195733

>> x=-2:0.1:5;

>> y=sinh(x)+sin(x)-1;

>> plot(x,y,['r','*','-.'])

>> grid on

Рис.2 «График заданной функции»

Вывод: Создали функцию пользователя, вычислили значение функции в точке x0=3,1, где у=10.118. Построили график функции при заданных интервалах (рис.2).


А также другие работы, которые могут Вас заинтересовать

74189. Object-oriented programming languages and tools. Evolution of Smalltalk 41 KB
  The lnguge ws first generlly relesed s Smlltlk80. Smlltlklike lnguges re in continuing ctive development nd hve gthered loyl communities of users round them. NSI Smlltlk ws rtified in 1998 nd represents the stndrd version of Smlltlk.
74190. Logic programming languages and tools 38 KB
  User specifies the specifictions of solution nd the computer derives the execution sequence for tht solution: Let us hve irline flight informtion of the form: flightflight_number from_city to_city deprture_time rrivl_time Then ll the flights from Wshington DC to Snt Clr cn be specified s either direct flights or s flights with n intermedite stop: flightflight_number DC Snt Clr deprture_time rrivl_time or flightflight_number DC X deprt1 rrive1 flightflight_number X Los ngles deprt2 rrive2 deprt2 =rrive130 Unlike...
74191. Logic programming languages and tools. Programming languages versus logic programming 33.5 KB
  Properties: we cn ssign properties to individul entities for exmple fred would hve the property of being crnivore properties look like C function cll the nme of the property then the entity tht hs tht property is given in brckets e. Reltionships fcts: we cn ssign reltionships between entities for exmple fred ets met or wilm ets vegetbles reltionships in Prolog gin look like C function cll we give the reltionship nme first then in brckets the two entities tht re relted e. etswilmmet etswilmvegetbles. For exmple rule...
74192. Visual development languages and tools 32 KB
  But somehow it didn’t hve the sme impct s did integrted development environments IDEs on those newfngled ldquo;microcomputers. Until we hd Windows to provide the bsic ides of displying things in windows PCs hd foot nd hlf bck in the minfrme worldrdquo; he sid. While TurboPscl lunched the ide of n integrted development environment Duntemnn credits Microsoft’s Visul Bsic VB lunched in 1991 with being the first rel IDE. The timing of IDEs ws lso perfect for new form of development: the Web.
74193. Visual development languages and tools 43 KB
  Visul development lnguges nd tools. In the summer of 1991 Microsoft introduced development tool clled Visul Bsic. Visul Bsic revolutionized ll this tedious code. Insted of hving to write lengthy code to mke window respond to mouse Visul Bsic hndled ll of those ctions nd hid them from the progrmmer.
74194. Multiparadigm programming language – Python 50 KB
  Multiprdigm progrmming lnguge – Python.1 Python is generlpurpose progrmming lnguge tht blends procedurl functionl nd objectoriented prdigms. Python is powerful multiprdigm computer progrmming lnguge optimized for progrmmer productivity code redbility nd softwre qulity. Python is populr open source progrmming lnguge used for both stndlone progrms nd scripting pplictions in wide vriety of domins.
74195. Version control software and tools 39 KB
  Version control softwre nd tools1 Version control lso clled subversion control or revision control helps lrge projects from spinning out of control by letting individul progrmmers writers or project mngers tckle project from different ngles without getting in ech other’s wy nd without doing dmge tht cn’t be undone. Version Control lets you trck your files over time. You’ve probbly cooked up your own version control system got ny files like this: Lb1_1. dd version number or dte: Document_V1.
74196. Cloud computing: programming models 35 KB
  Cloud computing: progrmming models1 Cloud computing is computing in which lrge groups of remote servers re networked to llow centrlized dt storge nd online ccess to computer services or resources. Clouds cn be clssified s public privte or hybrid. Cloud computing relies on shring of resources to chieve coherence nd economies of scle similr to utility like the electricity grid over network. t the foundtion of cloud computing is the broder concept of converged infrstructure nd shred services.
74197. History of programming languages and tools 242.5 KB
  History of progrmming lnguges nd tools. PreHistory The first progrmming lnguges predte the modern computer. Figure 1 Punch crd Like mny firsts in history the first modern progrmming lnguge is hrd to identify. To some people the nswer depends on how much power nd humnredbility is required before the sttus of ldquo;progrmming lngugerdquo; is grnted.