Re: [問題]meshgrid中可以加點嗎? 已回收
※ 引述《terrorist38 (冷到睡著)》之銘言:
: 不好意思 要來請教各位大大
: 我做了meshgrid
: x=-1:0.02:1;
: y=0:0.02:1;
: [xx,yy]=meshgrid(x,y);
: 如今要在格網中局部加入幾個點
: 例如: ┌───────┐ ┌───────┐
: │ . . . . .│ │ . . . . .│
: │ │ │ . . │
: │ . . . . .│ → │ . . . . .│
: │ │ │ │
: │ . . . . .│ │ . . . . .│
: └───────┘ └───────┘
: 不知道怎麼上色 如上圖若想增加類似這樣兩個點
: 請問有比較好的方法可以解決這個問題嗎 來此麻煩板上大大解答 先說聲謝謝!
meshgrid沒有辦法直接做到你的要求
不過你的要求可以用別的方法來做
只是到底快不快或方不方便就要由自己取捨了
先用meshgrid直接做出這樣比較密的網格
┌───────┐
│ . . . . .│
│ . . . . .│
│ . . . . .│
│ . . . . .│
│ . . . . .│
└───────┘
然後找出想要的節點index
┌───────┐
│ . . . . .│
│ . . . . .│
│ . . . . .│
│ . . . . .│
│ . . . . .│
└───────┘
接著使用index控制將xx與yy中特定節點抓出來
就可以有你想要的網格來使用了
┌───────┐
│ . . . . .│
│ . . │
│ . . . . .│
│ │
│ . . . . .│
└───────┘
--
On the surface, the scientist invests the power of his mind in a single
miraculous idea and naturally begins to rise above his fellows. But the
parasites say "NO! Discovery must be regulated! It must be controlled and
finally surrendered."
─Andrew Ryan
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.120.24.116
推
07/22 20:24, , 1F
07/22 20:24, 1F
→
07/22 20:26, , 2F
07/22 20:26, 2F
→
07/22 20:27, , 3F
07/22 20:27, 3F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):