Repository navigation
Fix combnk MATLAB behavior - #504
Closed
sahilphad07-sudo wants to merge 2 commits into
Closed
sahilphad07-sudo wants to merge 2 commits into
sahilphad07-sudo wants to merge 2 commits into
Conversation
Member
|
Thank you, but I am closing this without merging. The |
pr0m1th3as
added a commit
that referenced
this pull request
Sep 24, 2026
* inst/Data_Manipulation/combnk.m: return a 1-by-0 array of the class of DATA for K = 0; describe K in the help text; add tests.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
combnkdid not match MATLAB behavior for non-positive values ofk.For
k = 0, Octave returned a0x0empty result instead of MATLAB's1x0empty row vector. Negative values ofkwere also rejected, while MATLAB returns a1x0empty row vector.This change updates the handling of non-positive
kvalues to match MATLAB behavior.Before
After
MATLAB Behavior
Regression Tests Added
k = 0kTest Results
All existing and new
combnkBISTs pass: