MATLAB Answers

fprintf parse error, invalid matlab syntax

3 views (last 30 days)
for i = 1:r/s
newt = t-atand(i*s/(sqrt(r^2-(i*s)^2)));
fprintf(N_file,'G01 X%1.6f Y%1.6f C%1.0f B360;\n', -i*s, sqrt(r^2-(-i*s)^2)-r),newt);
fprintf(N_file,'G02 X%1.6f I%1.6f J0.0 K0.0;\n', -i*s, i*s);
end
error message:

Accepted Answer

Stephen Cobeldick
Stephen Cobeldick on 30 Mar 2021
fprintf(N_file,'G01 X%1.6f Y%1.6f C%1.0f B360;\n', -i*s, sqrt(r^2-(-i*s)^2)-r),newt);
% ^ delete this

More Answers (0)

Community Treasure Hunt

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

Start Hunting!