Commit 8604aa8f authored by KRATI TIWARI's avatar KRATI TIWARI

Add lab01_group10_final

parents
We have learned about functions like save, fwrite, fprint, fzero. We referred to the site gnu octave for the syntax of the various functions which we used in the program.
it was a nice experience.
function y=f(x)
A=load("input_inlab_task_A1.txt");
nx=A(1);
ny=A(2);
y=sin(x)-nx*cos(x)*sin(x/3)-ny*sin(x)*sin(x/3);
endfunction
result=fzero("f",0.00001);
filename = "output_inlab_task_01.txt";
fid = fopen (filename, "w");
fprintf(fid,"%.12f\n",result);
fclose (fid);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment