Info

This question is closed. Reopen it to edit or answer.

How can i (input angles and output angles, with 15 decimal places) into a text file named fourbar.txt. Input angles are θ2 = 0 to 360 and the output angles are obtained from the root finding ModiSecant method

1 view (last 30 days)
How can I write (input angles and output angles, with 15 decimal places) into a text file named fourbar.txt. Input angles are θ2 = 0o to 360o and the output angles are obtained from the root finding method which is Modisecant method. Ive chosen this method as i have made the comparisons from other methods by running the program and observe the number of iterations. So, kindly please help me solve this problem.

Answers (1)

Walter Roberson
Walter Roberson on 4 Sep 2015
fid = fopen('fourbar.txt', 'wt');
for theta2 = 0 : 360
... calculate OutputAngle based upon theta2
fprintf('%.15f %.15f\n', theta2, OutputAngle);
end
fclose(fid);

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!