ある数のベクトルが与えられた場合、そのベクトルの要素の一つが他の要素の二乗であれば true を返し、それ以外の場合は false を返すようなコードを書いてみましょう。

例:

 入力が  a = [2 3 4] のとき、
 出力 b は true になります。
 2の2乗は4であり、ベクトル内に2と4の両方が含まれているため、出力は true になります。

Solution Stats

599 Solutions

339 Solvers

Last Solution submitted on Feb 01, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers339

Suggested Problems

More from this Author12

Community Treasure Hunt

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

Start Hunting!