error in read data in JULIA v1.0

in older versions in julia, i used the readlm command to read data in *.dat

Now, in julia v1.0 , the same code, i have this error

UndefVarError: readdlm not defined

what should i do ? in older version of julia, the code works fine ! now, in julia v1.0, give this error

I use the INTERPOLATION package too.

Julia 0.7 tells you the answer:

julia> readdlm
WARNING: Base.readdlm is deprecated: it has been moved to the standard library package `DelimitedFiles`.
Add `using DelimitedFiles` to your imports.
 in module Main
readdlm (generic function with 6 methods)

julia> 

1 Like

thanks … works fine … now, do you know what is this problem ?

when i try to plot something, the error

linspace not defined

how can i solve it ?

and how can i use:

t=[0.1:0.1:2pi]
s=sin(t)
plot(t,s)

Exactly the same answer: use 0.7 and get the answer.

Well, in this case 0.7 doesn’t give any warning.

I would try:

t=range(0.1,step=0.1,stop=2*pi)
s=sin.(t)
plot(t,s)

Notice the dot after the sin .
No guarantee that this works, couldn’t test it.

hello … thanks a lot … works fine …

but …

i have, for example —

tt=range(0.1,step=0.1,stop=2*pi)
s(t)=sin.(t)

for t in tt

plot(t->s(t),tt[1],tt[end])
end

how can i do that?

Do you want me to do your homework? :face_with_raised_eyebrow:

4 Likes

it is not howework kkk …
but in julia v0.7 pyplot does now work … it be fix in julia v1.0

but thanks a lot ! if you have time, help me … thanks

2 Likes

0.7 does give a warning:

julia> linspace(1,2)
┌ Warning: `linspace(start, stop)` is deprecated, use `range(start, stop=stop, length=50)` instead.
│   caller = top-level scope at none:0
└ @ Core none:0
1.0:0.02040816326530612:2.0

So replace linspace with range. Any problem?