From 8ac15bc5efafa2afc053c293152605b0e6ae60ff Mon Sep 17 00:00:00 2001 From: Siddharth Agarwal Date: Tue, 3 Sep 2019 18:27:40 +0530 Subject: Xcos examples from textbooks and for blocks --- Working_Examples/154/DEPENDENCIES/ch1_4.sce | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 Working_Examples/154/DEPENDENCIES/ch1_4.sce (limited to 'Working_Examples/154/DEPENDENCIES/ch1_4.sce') diff --git a/Working_Examples/154/DEPENDENCIES/ch1_4.sce b/Working_Examples/154/DEPENDENCIES/ch1_4.sce new file mode 100755 index 0000000..4a00b66 --- /dev/null +++ b/Working_Examples/154/DEPENDENCIES/ch1_4.sce @@ -0,0 +1,14 @@ +clc +disp("Example 1.4") +printf("\n") +printf("Given") +disp("Potential difference is 50V") +disp("Charge per minute is 120C/min") +V=50;x=120; +//As Electrical energy is to be calculated charge per minute is to be converted in charge per second +//Charge per second is nothing but the current +i=x/60; +P=i*V; +//Since is 1W=1J/s +printf("Rate of energy conversion is %dJ/s\n",P) + -- cgit