Using explicit iteration is not the most efficient way of solving this problem, but if you do choose to iterate I would suggest using "linear indexing", per https://au.mathworks.com/help/matlab/math/matrix-indexing.html?s_tid=doc_srchtitle#f1-85511
Generate a vector like 1,2,2,3,3,3,4,4,4,4
3613 Solvers
2981 Solvers
Find out value of sine given by degree.
231 Solvers
Matlab Basics - Convert a row vector to a column vector
419 Solvers
228 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!