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

Restrict size of input parameters #770

Merged
merged 2 commits into from
Nov 9, 2022
Merged

Restrict size of input parameters #770

merged 2 commits into from
Nov 9, 2022

Conversation

mzaffalon
Copy link
Contributor

Fix #769.

@mzaffalon
Copy link
Contributor Author

Also fixes

using ControlSystems
A = ones(3,3);
B = ones(3,1);
C = ones(1,3);
D = 0;
lsim(ss(A,B,C,D), (x,t)->0, 0:0.1:1)

ERROR: ArgumentError: indexed assignment with a single value to possibly many locations is not supported; perhaps use broadcasting `.=` instead?
Stacktrace:

@codecov
Copy link

codecov bot commented Nov 4, 2022

Codecov Report

Merging #770 (cbc7f65) into master (7029934) will increase coverage by 95.23%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master     #770       +/-   ##
===========================================
+ Coverage    0.00%   95.23%   +95.23%     
===========================================
  Files           3        4        +1     
  Lines         293      294        +1     
===========================================
+ Hits            0      280      +280     
+ Misses        293       14      -279     
Impacted Files Coverage Δ
src/timeresp.jl 94.90% <100.00%> (+94.90%) ⬆️
src/ControlSystems.jl 100.00% <0.00%> (ø)
src/simulators.jl 87.50% <0.00%> (+87.50%) ⬆️
src/root_locus.jl 97.10% <0.00%> (+97.10%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@baggepinnen
Copy link
Member

Thanks for the PR! The two issues that are fixed by this PR should probably be added as tests?

@mzaffalon
Copy link
Contributor Author

I pushed the tests.

@baggepinnen baggepinnen merged commit 31ed4b9 into JuliaControl:master Nov 9, 2022
@mzaffalon mzaffalon deleted the lsim-restrict-input-type branch November 9, 2022 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lsim, error when input is a matrix
2 participants