matlab 删除指定元素等 null

 

 

 >>G

 

G =

 

Fourscore and seven years ago our fathers brought forth on this

continent a new nation, conceived in liberty and dedicated to the

proposition that all men are created equal.

 

 

>> G(G==' ')=[];G(G==',')=[];G(G=='.')=[]     删除空格,标点

 

G =

 

Fourscoreandsevenyearsagoourfathersbroughtforthonthis

continentanewnation,conceivedinlibertyanddedicatedtothe

propositionthatallmenarecreatedequal

 

 

 

你可能感兴趣的:(null,matlab)