|
Kyle,
Firstly, careful - there is a difference between braces and square brackets - thus there is a syntax error in [1:1:2000}. From the context, I'll assume you meant [1:1:2000]...
Secondly,
a = 1:1:2000;
b = a<500;
c = a(b).^2;
Thirdly, MATLAB, unlike most software, has incredibly comprehensive help pages. They're accessible either through MATLAB or online here. If you're asking questions like this, you just have to sit down and read the tutorials and the 'Getting Started' sections. If you post every minor question here, you won't get a very favourable response!
|