removing zeros from a stream of data
5 views (last 30 days)
Show older comments
i have figured out how to buffer randomly generated integers in to a vector with out actually making frames or using a buffer. the problem is i now have a stream of 187 zero vectors with a vector of 188 integers on the 188th instance. how do i remove the 187 zero vectors or how do i allow a MATLAB function block to with hold its output 187 times without getting the "Output argument 'y' is not assigned on some execution paths" error message?
thanks steve
0 Comments
Answers (1)
Image Analyst
on 23 Mar 2014
Hard to say without seeing your code but you can delete a variable with the clear() function. I don't know if your 188 vectors all have different names or if they are rows or columns in a 2D matrix. If they have different names:
clear('vector153'); % Delete the variable vector153.
If it's a 2D array and some columns are completely all 0's and you want to get rid of those, you can do
a = a(:,any(a));
See Also
Categories
Find more on String in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!