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

例:

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

Solution Stats

625 Solutions

343 Solvers

Last Solution submitted on Feb 15, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Group


Problem Recent Solvers343

Community Treasure Hunt

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

Start Hunting!