I want to subset values in a table based on a range of numbers specific to one of my variables.
3 ビュー (過去 30 日間)
古いコメントを表示
I have variable W and variable A. I would like to create separate tables based on a specified range of W. For example, if my first range is 450-400, I would like all of the values of W that fit into this range to make a separate table containing both W and A values.
0 件のコメント
回答 (1 件)
David Hill
2022 年 8 月 15 日
W=randi(500,100,1);
A=randi(500,100,1);
M=[W(W>=400&W<+450),A(W>=400&W<+450)]
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!