summaryrefslogtreecommitdiff
path: root/858/CH7/EX7.10/example_10.sce
blob: 4942d297d42c9aaed410376e50e24c0c16179e22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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))