Parametric Array - MATLAB Cody - MATLAB Central

Problem 55265. Parametric Array

Difficulty:Rate
Create a row vector, 1xN (Integer, >1), such that
the mean of the vector is M (Real number) and the standard deviation of the vector is S (Real number)
%example
N=2;
M=0;
S=sqrt(8);
y=[2 -2]
%or
y=[-2 2]
There is no unique answer, and the answer will be checked against the mentioned conditions.
The expected precision of Mean and STD is 6 digits after decimal.

Solution Stats

28.13% Correct | 71.88% Incorrect
Last Solution submitted on Sep 20, 2025

Problem Comments

Solution Comments

Show comments
Join Cody Contest 2025 — Have Fun and Win Prizes!
...
We’re excited to invite you to Cody Contest 2025! 🎉 Pick a team,...

Problem Recent Solvers8

Suggested Problems

More from this Author43

Community Treasure Hunt

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

Start Hunting!