summaryrefslogtreecommitdiff
path: root/1172/CH9/EX9.1/Example9_1.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1172/CH9/EX9.1/Example9_1.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1172/CH9/EX9.1/Example9_1.sce')
-rwxr-xr-x1172/CH9/EX9.1/Example9_1.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/1172/CH9/EX9.1/Example9_1.sce b/1172/CH9/EX9.1/Example9_1.sce
new file mode 100755
index 000000000..5af7d8f50
--- /dev/null
+++ b/1172/CH9/EX9.1/Example9_1.sce
@@ -0,0 +1,11 @@
+clc
+//Given that
+m_i = 15 // initial magnitude of supernova
+m_f = 2 // final magnitude of supernova
+// sample problem 1 page No. 332
+printf("\n # Problem 1 # \n")
+
+printf("Standard formula used \n\t M = m - 2.5log(L/L_0) ")
+del_m = m_i - m_f // calculation of change in magnitude
+brightness_ratio = 100^(del_m/5) // calculation of increment in brightness ratio.
+printf ("\n In two days novas brightness is increased by %d times nearly", ceil(brightness_ratio / 10000)*10000 )