Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Is there no one with the knowledge of cell operation :(
1 回表示 (過去 30 日間)
古いコメントを表示
Hi. i have been asking this question again and again..with no real answer to it..it is supposed to be simple operation. but matlab is disappointing me now.
I have data in 1 cell. i want the values greater than 230 to be moved or copied into another cell. see pic.
so values at V{:,2} is 231,06 and is greater than 230, so with a code it should be moved or copied to next column.
a simple for loop or if ?
suggestions or help please?
0 件のコメント
回答 (1 件)
Sean de Wolski
2014 年 3 月 18 日
編集済み: Sean de Wolski
2014 年 3 月 18 日
First, you asked the first question on here just a few hours ago. Contributors on this page are unpaid volunteers so it cannot be expected to get an answer immediately.
However, good job clarifying your question with the image!
C = {'hello world';245;220};
isAbove230 = @(x)isnumeric(x) && x>230; % define a function to identify elements above 230
idx = cellfun(isAbove230,C); % where are they?
C(idx) = []; % remove offending elements
Or to make a copy
C230 = C(idx);
5 件のコメント
Walter Roberson
2014 年 3 月 18 日
I am not convinced that the entries are numeric; I think maybe they are all strings.
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!