In order to feed into another program, I must do exactly as the title says. So far, I have been able to find the indices where a blank row is needed directly after each row number, but have been unsuccessful in adding them. I have tried using a For loop to add blank lines directly to the matrix, however vertcat had an error due to the difference in sizes as newline is a character array. Then, I figured that this may be easier if I changed the format to a table, but this was also successful. Below is the only successful part of my code. It is not necessary for the blank lines to be shown in matlab, as long as the written file has them.
s= load("data.dat"); p= 1:length(s)-1; i= s(p,1) ~= s(p+1,1); y= find(i); %list of indices
You can’t have blank lines in a matrix, simply:
s = [1, 2, 3;... 4, 5, 6]; % an example [m,n] = size(s); Wanted = reshape([s, nan(m, n)].', n, []).'
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.