Apply conditions in if statement.

30 views (last 30 days)
Silpa K
Silpa K on 13 Oct 2019
Commented: Shivam Prasad on 16 Oct 2019
A = [];
for ii = 1:length(subSequence)
if any(ismember(subSequence{ii},out)) && mod(k-midpoint)<=G+l/2
A{end+1} = subSequence{ii};
end
end
Iam getting errors when Iam using the second condition 'mod(k-midpoint)<=G+l/2'.
The error is like:
Error using mod
Not enough input arguments.
Error in Facetra (line 38)
if any(ismember(subSequence{ii},out)) && mod(k-midpoint)<=G+l/2
How can I avoid this errors.
  4 Comments
Shivam Prasad
Shivam Prasad on 16 Oct 2019
Hi Silpa,
Can you let me know what are you trying to do in these lines of code? Maybe you require a different function to implement the operation.
The mod function defined as mod(a,b) implements the mathematical operation a%b, which is the remainder when a is divided by b.
More on mod function :-

Sign in to comment.

Answers (0)

Categories

Find more on Operators and Elementary Operations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!