Mesgrid of time dependent coordinates
조회 수: 3 (최근 30일)
이전 댓글 표시
I am trying to use a mesgrid operation to define a series of time-depedent grids.Currently, I am using a "for" loop, but I would like to vectorize this operation
For example,
for tt=1:1000
x(tt)=100*cos(tt)
y(tt)=100*sin(tt)
[X, Y] = meshgrid[x(tt)-2:x(tt)+2, y(tt)-2:y(tt)+2]
end
댓글 수: 0
답변 (1개)
Star Strider
2020년 10월 1일
I am not certain what you want to do.
Experiment with this:
tt = linspace(-pi, pi, 50);
x = 100*cos(tt);
y = 100*sin(tt);
[X,Y] = meshgrid(x, y);
.
댓글 수: 2
Star Strider
2020년 10월 1일
I am not certain what you want to do, however that should be relatively straightforward. Choose the functions you want, and calculate them as I did, then calculate with the new mesh (likely in a loop) and store the results.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!