-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to import your OMP function #8
Comments
Good question @WillPowellUk! Did you try adding In the REPL (i.e. terminal), you can do this by first typing " julia>]
(@v1.9) pkg> add CompressedSensing This should install all the required dependencies and might take a few minutes. After that is done, press "delete" to exit the package manager. You should see " Now the final step: julia> import CompressedSensing: omp
julia> A = randn(3, 4); b = randn(3);
julia> omp(A, b, sparsity=2)
4-element SparseArrays.SparseVector{Float64, Int64} with 2 stored entries:
[1] = 0.856756
[2] = 0.0834363 I apologize for the lack of clear documentation. This grew out of a grad school project of mine. If the above resolves your issue, I'll add it to the README. |
@SebastianAment Thank you ever so much. Your instructions are very clear, and worked like a charm. I really appreciate you open sourcing this. Do add to the ReadMe to help others. Cheers! |
Hi Sebastian,
I am struggling to import your code so that I can run your omp function.
I am sure there will be a more elegant solution but as of now I have included all the files locally, and then tried to run omp:
`include("CompressedSensing.jl-main/src/matchingpursuit.jl")
include("CompressedSensing.jl-main/src/util.jl")
include("CompressedSensing.jl-main/src/backward.jl")
include("CompressedSensing.jl-main/src/basispursuit.jl")
include("CompressedSensing.jl-main/src/exhaustive.jl")
include("CompressedSensing.jl-main/src/forward.jl")
include("CompressedSensing.jl-main/src/matchingpursuit.jl")
include("CompressedSensing.jl-main/src/oblivious.jl")
include("CompressedSensing.jl-main/src/sbl.jl")
include("CompressedSensing.jl-main/src/stepwise.jl")
include("CompressedSensing.jl-main/src/twostage.jl")
include("CompressedSensing.jl-main/src/CompressedSensing.jl")
omp(A, b, k)
However I am getting the eror
LoadError: UndefVarError:SparseVector
not defined` which I assume is a dependency from a file that is included later.I apologies for my ineptidue in Julia but please advise.
Kind regards,
Will
The text was updated successfully, but these errors were encountered: