MATLAB: How can increase programming lines in matlab

extendlines

I wrote function codes.For example, These are only 10 lines. I want more than many (many) lines. If we can have more lines, that is so good. How can I increase the number of lines to give me more than 10 lines. Forgive me my poor english. Please! help me. Thanks!
> [n,m]=size(b)
c=reshape(b',1,m,n)
> out=bsxfun(@eq,a,c)
e1=all(out(:,:,1),2)
> e2=all(out(:,:,2),2)
e3=all(out(:,:,3),2)
e4=all(out(:,:,4),2)
> e5=all(out(:,:,5),2)
d=[(1:15)' e1 e2 e3 e4 e5]
g=d(1:15,2:6)

Best Answer

  • Add some comments. That could at least double the number of lines and make it look like you're more like a professional programmer. You could also toss some lines like these at the beginning of your program
    clc; % Clear the command window.
    close all; % Close all figures (except those of imtool.)
    clear; % Erase all existing variables. Or clearvars if you want.
    workspace; % Make sure the workspace panel is showing.
    format long g;
    format compact;