Replacing symbolic vector with changing values
이전 댓글 표시
I have a symbolic vector with repeating entries, similar to:
(cos(x), cos(x), cos(x), cos(x+5), cos(x+5)...)
and what i want to do is replace x with incrementing values so I can plot it. I have tried subs but it does not work properly. If my vector is the one i defined, i want my result to be
(cos(1), cos(2), cos(3), cos(4+5), cos(5+5)...)
but evaluated so that I may graph it. Is there a simple way to do this? I wrote an EXTREMELY inefficient loop that accomplished this by substituting the variable for the entire vector then storing only the necessary element into an output array, but it cannot handle the size i need.
Thanks
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Labels and Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!