Info
此问题已关闭。 请重新打开它进行编辑或回答。
could anyone help me to solve the error in the following code
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!