sje30 / Julialang-CATAM

Developing Julia language resources for CATAM
1 stars 2 forks source link

Control Flow #3

Closed pittachalk closed 4 years ago

pittachalk commented 4 years ago

Add PDF and JMD for control flow. To generate PDF:

using Weave
weave("conditionals.jmd", doctype="md2pdf")
dpsanders commented 4 years ago

Nice example, but as a general rule I would suggest to return the vector of iterates rather than printing out.

When you call the function, Julia will automatically output the sequence of iterates and tell you the length of the resulting vector. It also allows you to save the results for later plotting etc.