I have a 1D matrix or an array, I have attached files.
I have to delete its rows, such that starting from 4 till 6, then 10 to 12, then 16 till 18 and so on...
so basically leave three and then delete three.. leave 1 2 3 delete 4 5 6 then leave 7 8 9 delete 10 11 12... and going on till the last of matrix
I made this small program.
The problem I am having is in defining the variable X which tells how long will this loop run for until all the required rows are deleted.
[V,D] = eigs(Stiffness_Global,Mass_Global,1,'smallestabs')
for i =1:1:X
for j =a:1:(a+2)
a = a+4
Does anyone has an idea?
Can it be done without loops?