-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0ed0e8
commit 67bd1e4
Showing
2 changed files
with
2 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1 @@ | ||
#TODO this does NOT work; `parameters` are not required to be Ordered Dictionary | ||
paramfile = open("parameters.dat") | ||
parameters = Meta.parse.(readlines(paramfile)) | ||
close(paramfile) | ||
|
||
f(t) = parameters[1] * t - parameters[2] # a * t - b; linear model | ||
times = 1:4 | ||
predictions = map(f, times) | ||
|
||
predicfile = open("predictions.dat", "w") | ||
for prediction in predictions | ||
write(predicfile, string(prediction, "\n")) | ||
end | ||
close(predicfile) | ||
../models/external-linear-model/external-linearmodel-ascii.jl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1 @@ | ||
#TODO this does NOT work; `parameters` are not required to be Ordered Dictionary | ||
paramfile = open("parameters.dat") | ||
parameters = Meta.parse.(readlines(paramfile)) | ||
close(paramfile) | ||
|
||
f(t) = parameters[1] * t - parameters[2] # a * t - b; linear model | ||
times = 1:4 | ||
predictions = map(f, times) | ||
|
||
predicfile = open("predictions.dat", "w") | ||
for prediction in predictions | ||
write(predicfile, string(prediction, "\n")) | ||
end | ||
close(predicfile) | ||
../models/external-linear-model/external-linearmodel-ascii.jl |