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!