Info
This question is closed. Reopen it to edit or answer.
could anyone help me to solve the error in the following code
2 views (last 30 days)
Show older comments
code:
clc;
A_mas=1:8
for s=1:numel(A_mas)
A=partitions(A_mas,1-s,2)
B=0;
while ~isempty(A)
B= B+1;
if B>numel(A)
idx=1;
B=1;
else
idx=[1 (numel(A)-B+2):numel(A) ];
end
C=A(idx)
A(idx)=[];
end
end
If i run the code i am getting error stating Error using partitions Too many input arguments.
Error in line A=partitions(A_mas,1-s,2). Could anyone please help me on this.
2 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!