統計
MATLAB Answers
1 質問
0 回答
ランク
of 176,138
コントリビューション
0 問題
0 解答
スコア
0
バッジ数
0
コントリビューション
0 投稿
コントリビューション
0 パブリック チャネル
平均評価
コントリビューション
0 ハイライト
平均いいねの数
Feeds
質問
Write a function nextinteger(v) which takes as input a vector v and as output returns the smallest positive integer which does not appear in v. For example, if the input is [1, 2, 3], the output would be 4. If the input is [4, 0, 1, -10], output =2
This funtion worked for the vector [1,2,3,4] but not for [4, 1, 0, -10] function [ ] = nextinteger(v) n = max(v); ...
8年以上 前 | 2 件の回答 | 0