Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.7K Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Use IF, condition with {} ?

Hi, i Have

H = {1.5, 0.4}; 
cp4p = {{{1, 2}, {3, 4}, {5, 6}}, { }}; 
For[i = 1, i <= Length[H], i ++, If[cp4p[[i,All,All]]=="{}" , Delete[H,i], H[[i]]]]

But the instruction doesn't work, why?

I would as result

`H={1.5}`

This is un exemple that generalize my case.

Thank you for your attention. Margherita

2 Replies
POSTED BY: Sander Huisman

thanks a lot

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard