How can increase programming lines in matlab?

1 view (last 30 days)
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)
  4 Comments
pioneer
pioneer on 2 Jul 2014
Star stride => Not relate to my previous question. Thanks you.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 30 Jun 2014
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;

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!