MATLAB Answers

0

2 variables in single cell

Asked by dinesh kumar mohan on 21 Sep 2019
Latest activity Answered by Dheeraj Singh on 3 Oct 2019
a=[1
4,5
7 ]
(1*3 matrix)
B=[1
10
12,14]
(1*3 matrix)
i have a print the max of a and b??

  6 Comments

madhan ravi
on 21 Sep 2019
Why not upload the file?
from the attchemendt i have to read theexcel and find the critical path and start and finish of each activity.
Guillaume
on 21 Sep 2019
How is what you're now asking in any way related to your original question?

Sign in to comment.

1 Answer

Answer by Dheeraj Singh on 3 Oct 2019

You can try the following approach:
First you can make cell for all processes and populate it with duration of all processes it depends on.
The cell array may look like:
s=cell(7,1);
s{1}=[];%duration 2
s{2}=[];%duration 1
s{3}=[];%duration 3
s{4}=[2 1];%depends on 1 and 2
s{5}=[1 3];%depends on 2 and 3
s{6}=[3];%depends on 3
s{7}=[s{4} s{5} s{6}]%depends on 4,5,6
After getting all the duration populated, we can get the maximum for each column in the following manner:
t=cellfun(@max,s,'UniformOutput',false)
The empty cells mean the process is not dependent on any other process.

  0 Comments

Sign in to comment.