Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cs251_group21
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CHANDAN SNEHAL KAILAS
cs251_group21
Commits
39f66f17
Commit
39f66f17
authored
Aug 23, 2016
by
CHANDAN SNEHAL KAILAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First commit
parents
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
readme.txt
readme.txt
+31
-0
refraction.m
refraction.m
+9
-0
No files found.
readme.txt
0 → 100644
View file @
39f66f17
Group Name terror
Number 21
Members
(150050050-Kunal Makwane)(150050106-Arshdeep Singh)(150070023-Snehal Chandan)
Honour Code:
I pledge on my honour that I have not given or received any unauthorized assistance on this assignment or any previous task.
Citations:
1)http://www.gnu.org/software/octave/octave.pdf
2)http://www.dm.unibo.it/∼lenci/teaching/14/maa/octavetut.pdf
3)https://www.gnu.org/software/octave/doc/v4.0.1/Binary-I_002fO.html
Reflection Essay:
*Got to learn about octave and hence learn how to solve equations directly using predefined functions
like fzero and fsolve.
*How to create output file and input values into variables from an input file using methods like
fopen,load, fwrite etc.
*We learnt about %f,%d and other formats and how to set the precision of the answer.
Member contribution:
All the three contributed equally.
Kunal Makwane 100%
Arshdeep Singh 100%
Snehal Chandan 100%
refraction.m
0 → 100644
View file @
39f66f17
N=load("input_inlab_task_A1.txt"); %input file
nx=N(1); %input first value that is nx
ny=N(2); %input second value that is ny
fun=@(i)nx*cos(i)*sin(i/3)+ny*sin(i)*sin(i/3)-sin(i); %function declaration
z=fzero(fun,0.00001) %using predefined function fzero to find solution of fun=0
a=fopen("output_inlab_task_01.txt","w"); %creating output file (write format)
fprintf(a,"%2.16f",z); %printing in output file
fclose(a); %closing the output file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment