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 --- 858/CH7/EX7.10/example_10.sce | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 858/CH7/EX7.10/example_10.sce (limited to '858/CH7/EX7.10') diff --git a/858/CH7/EX7.10/example_10.sce b/858/CH7/EX7.10/example_10.sce new file mode 100755 index 000000000..4942d297d --- /dev/null +++ b/858/CH7/EX7.10/example_10.sce @@ -0,0 +1,18 @@ +clc +clear +printf("example 7.10 page number 316\n\n") + +//to find the % transformation +moles_A = 3; +moles_B = 5; +K = 1; + +function[f] = F(x) + f = 15-8*x; +endfunction + +//initial guess +x = 10; +y = fsolve(x,F); +printf("amount of A transformed = %f percent",y*(100/3)) + -- cgit