问题44648。方形矩阵的曲折
Solution Stats
Problem Comments
-
6 Comments
我想作业应该阅读:
assert(isequal(zigzag(a),y_correct))
While you are amending the Test Suite, please add more test cases (at least four), to ensure only general solutions are successful, not hard-coded submissions. (See Problem 44617 for further ideas.)
Please also check the Solution Template. Currently there is a lot of code in the Solution Template which everyone can see! Usually the Solution Template would be almost blank. —DIV
This problem has been fixed so that it (1) no longer displays a solution in the function template, (2) is solvable, and (3) has additional test cases added.
By the way, this problem is essentially identical to //www.tatmou.com/matlabcentral/cody/problems/1167-matrix-zigzag.
@goc3:这两个问题并不完全相同,因为此问题具有一个包含0个元素的测试(最后一个),这几乎会改变所有内容,如果某些特定功能(例如nonzeros等)被视为使用。
@bainhome: then it's a good thing I added that extra test case to make the problems slightly different.
Problem Recent Solvers17
Suggested Problems
423 Solvers
571个求解器
Find the maximum number of decimal places in a set of numbers
1498 Solvers
Join Strings with Multiple Different Delimiters
104 Solvers
Sum the numbers on the main diagonal
解决508
来自作者的更多2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
开始狩猎!