Groups
Conversations
All groups and messages
Send feedback to Google
Help
Training
Sign in
Groups
中文 Scilab 教育論壇
Conversations
About
資料判別
24 views
Skip to first unread message
李建緯
unread,
Apr 16, 2018, 6:30:19 AM
4/16/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 中文 Scilab 教育論壇
又來跟各位請教一下
我的數據資料如下
兩行點資料
可是第一行的點資料當中
我只要-2~+2 然後對應第二行
如紅色的是我所要的
我的想法是
x1=evstr(x_dialog('Max X','-'))
m=A(:,1)
n=A(:,2)
可是我實在想不到該如何
一行一行比對還是有神麼方法可以快速取出我要的紅色區
請各位幫忙指點一下
謝謝
-2.60654009
5.85084E-05
-2.40729496
7.45982E-05
-2.20844047
7.72494E-05
-2.00780915
3.47017E-05
-1.80828346
6.53758E-05
-1.60570869
8.19226E-05
-1.40854527
7.58323E-05
-1.20856301
0.000082917
-1.00850262
7.07297E-05
-0.80640724
4.61769E-05
-0.61095771
8.38714E-05
-0.40834417
4.24027E-05
-0.20921028
9.31387E-05
-0.01025209
7.21012E-05
0.19148332
5.34811E-05
0.39830647
4.30699E-05
0.60817061
1.28049E-05
0.81997926
4.16745E-05
1.01932234
8.43332E-05
1.22927323
8.74524E-05
1.44127426
9.64163E-05
1.64055861
6.25325E-05
1.84042167
8.52346E-05
2.04082898
6.84377E-05
2.23831836
6.54415E-05
2.45149785
4.05636E-05
2.64982066
9.31754E-05
2.86186323
5.03604E-05
111.txt
李建緯
unread,
Apr 17, 2018, 11:59:27 PM
4/17/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 中文 Scilab 教育論壇
經由論壇上的高手 pipidog的指導
由他告訴我的方法如下
假設你的資料數據叫做A, A是一個Nx2矩陣
A( A(:,1) > -2 & A(:,1) < +2, 2) 就是你要紅色區間的第二行
或者你用find( A(:,1) > -2 & A(:,1) < +2) 就會給出你滿足條件的index.
我採用的是第一個方法A( A(:,1) > -2 & A(:,1) < +2, 2)
同時
x1=evstr(x_dialog('Max X','-'))
kk=A( A(:,1) > -x1 & A(:,1) < +x1, 1)
jj=A( A(:,1) > -x1 & A(:,1) < +x1, 2)
這樣把 kk jj組成一個N*2的矩陣即可
提供給有需要的人分享
謝謝 pipidog的指導
李建緯於 2018年4月16日星期一 UTC+8下午6時30分19秒寫道:
Reply all
Reply to author
Forward
0 new messages