From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1034/CH1/EX1.15/Example15.sce | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 1034/CH1/EX1.15/Example15.sce (limited to '1034/CH1/EX1.15/Example15.sce') diff --git a/1034/CH1/EX1.15/Example15.sce b/1034/CH1/EX1.15/Example15.sce new file mode 100755 index 000000000..fb0a8bd7b --- /dev/null +++ b/1034/CH1/EX1.15/Example15.sce @@ -0,0 +1,12 @@ +clear; +clc; +printf("\n \t Example 1.15"); +// how various functions grow with n, plotting of various functions is being shown. +// like function 2^n grows very rapidly with n. and utility of programs with exponential complexity is limited to small n ( typically n<=40). +n=[ 1 2 3 4 5 6];.......// takin value of n from 1 to 10 to observe the variation in various functions. +plot(log (n)); +plot(2^n); +plot(n); +plot(n^2); +xtitle("Plot of function values","n -->","f -->"); +printf(" \n \n X - axis is represented by values of n and Y-axis if represented by f"); -- cgit