MATLAB: How can increase programming lines in matlab


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)
> out=bsxfun(@eq,a,c)
> e2=all(out(:,:,2),2)
> e5=all(out(:,:,5),2)
d=[(1:15)' e1 e2 e3 e4 e5]

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;