Making moving obstacles in an matlab
古いコメントを表示
I have created random obstacles in MATLAB, (they are user acquired) now I am trying to make some obstacles randomly moving.
I Know that, in every iteration value of some obstacle be updated by adding some threshold valueto it.
But I am getting how to write up in code.
Kindly help me
12 件のコメント
Geoff Hayes
2019 年 1 月 2 日
faiza - you may want to provide more details or show some code so that we can get a better idea of what you are attempting to do. How are you storing the obstacles? Does each obstacle have a different speed? etc.
passioncoding
2019 年 1 月 2 日
編集済み: Geoff Hayes
2019 年 1 月 3 日
Geoff Hayes
2019 年 1 月 3 日
faiza - so you will probably want to save the handle of each "plotted" obstacle to an array and then decide (somehow) which obstacle is randomly chosen to move in some direction with some speed (how will you determine this?).
passioncoding
2019 年 1 月 3 日
Geoff Hayes
2019 年 1 月 3 日
how do you want to decide which points are moving and which aren't? this seems like an implementation detail...
passioncoding
2019 年 1 月 3 日
編集済み: Geoff Hayes
2019 年 1 月 4 日
Geoff Hayes
2019 年 1 月 4 日
faiza - but how do you want to choose the new position? Do you randomly choose a direction? And randomly choose a speed?
passioncoding
2019 年 1 月 4 日
Geoff Hayes
2019 年 1 月 4 日
so you want to generate a random speed for each obstacle and then use that speed for the remainder of the simulation...that should be relatively straightforward. You have an array of obstacles and so need to generate an array of speeds for each obstacle (where a speed can be zero for obstacles that are stationary). You will also need an array of directions unless the direction can change for each iteration of the simulation?
passioncoding
2019 年 1 月 4 日
Pravija Raj
2019 年 8 月 19 日
Hello Faiza,
I am working with a similar situation. Were you able to figure out the code for your scenario. Please kindly share if you have.
I will explain my problem here. I need to simulate an object that randomly moves in a square area in any direction for a duration of time with a random speed. Can any one help me with the code for this.
passioncoding
2019 年 9 月 10 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Graphics Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!