Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cs251_group15
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
KONDAPALLY ANIRUDH REDDY
cs251_group15
Commits
c3915253
Commit
c3915253
authored
Aug 23, 2016
by
KONDAPALLY ANIRUDH REDDY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding refraction.m
parent
fd55a41f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
refraction.m
refraction.m
+8
-0
No files found.
refraction.m
0 → 100644
View file @
c3915253
function y = f(x)
[nx,ny] = textread('input_inlab_task_A1.txt' , "%f"); #reads input into nx and ny
y=sin(x)*(ny*sin(x)*sin(x/3)-1)+cos(x)*nx; #x=incident angle
endfunction
[ x, info ] = fsolve("f" , 0.) #solves the equation which gives trisection
fid = fopen('output_inlab_task_A1.txt', "w");
fprintf(fid, "%f" , x);
fclose(fid);
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