MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > Finding a number in a row and creating a matrix wi... 

Subject: Finding a number in a row and creating a matrix with it From: Diego Zegarra Date: 19 Feb, 2009 03:23:02 Message: 1 of 14 
Assume the following, S_Seq contains 5 different schedules which will give the respective times in S. 
Subject: Finding a number in a row and creating a matrix with it From: Darren Rowland Date: 19 Feb, 2009 04:47:01 Message: 2 of 14 
I am going to present a method which will work on a matrix, rather than the cell array you have specified. 
Subject: Finding a number in a row and creating a matrix with it From: Darren Rowland Date: 19 Feb, 2009 04:48:02 Message: 3 of 14 
I am going to present a method which will work on a matrix, rather than the cell array you have specified. 
Subject: Finding a number in a row and creating a matrix with it From: Diego Zegarra Date: 19 Feb, 2009 14:56:02 Message: 4 of 14 
Not really, actually I have problems with 12 machine and 120 jobs as well. Sometimes machines do not have the same number of jobs, some may have 1 more than others. 
Subject: Finding a number in a row and creating a matrix with it From: Darren Rowland Date: 20 Feb, 2009 03:44:02 Message: 5 of 14 
"Diego Zegarra" <diegozbb@gmail.com> wrote in message <gnjru2$e07$1@fred.mathworks.com>... 
Subject: Finding a number in a row and creating a matrix with it From: Diego Zegarra Date: 20 Feb, 2009 04:10:03 Message: 6 of 14 
The number of sequences depend on the number of machines and jobs, 
Subject: Finding a number in a row and creating a matrix with it From: Darren Rowland Date: 20 Feb, 2009 06:04:01 Message: 7 of 14 
There are still some aspects of your code that I don't understand, however I think the following pseudocode will be reasonably fast. There are two quantities that I have left for you to compute, they are jobsJ and currJob. 
Subject: Finding a number in a row and creating a matrix with it From: Bruno Luong Date: 20 Feb, 2009 07:10:22 Message: 8 of 14 
% First advise: use array instead of cell. 
Subject: Finding a number in a row and creating a matrix with it From: Bruno Luong Date: 20 Feb, 2009 07:20:20 Message: 9 of 14 
% Slighly clearer 
Subject: Finding a number in a row and creating a matrix with it From: Bruno Luong Date: 20 Feb, 2009 07:26:03 Message: 10 of 14 

Subject: Finding a number in a row and creating a matrix with it From: Bruno Luong Date: 20 Feb, 2009 11:34:02 Message: 11 of 14 
% Even shorter 
Subject: Finding a number in a row and creating a matrix with it From: Bruno Luong Date: 20 Feb, 2009 11:40:21 Message: 12 of 14 
% Alternative last statement, Sparse matrix: 
Subject: Finding a number in a row and creating a matrix with it From: Diego Zegarra Date: 20 Feb, 2009 18:37:02 Message: 13 of 14 
Bruno, 
Subject: Finding a number in a row and creating a matrix with it From: Bruno Luong Date: 20 Feb, 2009 20:36:02 Message: 14 of 14 
"Diego Zegarra" <diegozbb@gmail.com> wrote in message <gnmt8e$r0s$1@fred.mathworks.com>... 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.