Skip to content
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

Fix undefined projection_matrix variable #717

Merged
merged 1 commit into from
Nov 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/ReachSets/project_reach.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ function project_reach(
sparse([1, 2], [xaxis, yaxis], [1.0, 1.0], 2, n)
end
else
@assert size(projection_matrix, 1) == 1 "currently we only " *
"support one-dimensional projection matrices"
@assert size(projection_matrix_high_dimensional, 1) == 1 "currently " *
"we only support one-dimensional projection matrices"
if got_time
# create a 1-row matrix
projection_matrix =
sparse(fill(1, n), 1:n, projection_matrix[1, :], 1, n)
sparse(fill(1, n), 1:n, projection_matrix_high_dimensional[1, :], 1, n)
else
# create a 2-row matrix
projection_matrix =
sparse(fill(2, n), 1:n, projection_matrix[1, :], 2, n)
sparse(fill(2, n), 1:n, projection_matrix_high_dimensional[1, :], 2, n)
projection_matrix[1, xaxis] = 1.0
end
end
Expand Down