Hey guys, please i need help on how to validate a vector using a while loop

3 次查看(过去 30 天)
%for example a vector x with values greater than 0, and length of 3
x>0;
length(x)=3;

回答(1 个)

Elias Gule
Elias Gule 2018-11-1
isValid = all(x>0) && length(x)==3;

类别

Help CenterFile Exchange 中查找有关 Argument Definitions 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by