Info
This question is closed. Reopen it to edit or answer.
create a vector with specified entries
5 views (last 30 days)
Show older comments
Hello, I need to create the following vectors:
x=[0 0 0 ...0] and y=[h h h...h]
where h is a constant that I declared. Both vectors need to have a length of 100
0 Comments
Answers (1)
Star Strider
on 29 Nov 2014
Use the zeros and ones funcitons, respectively:
x = zeros(1,100);
y = h*ones(1,100);
0 Comments
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!