06.09.2021 Views

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 1. INTRODUCTION 24<br />

-0.6298879942744539<br />

-0.5063656411097588<br />

Here is another way to do this. Start <strong>with</strong> creat<strong>in</strong>g an empty array:<br />

In [55]: newvalues=Array{Float64}(undef,0)<br />

Out[55]: 0-element Array{Float64,1}<br />

Then use a while statement to generate the values, and append them to the array.<br />

In [56]: n=1<br />

while n y<br />

pr<strong>in</strong>tln("$x is greater than $y")

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!