2 variables in single cell
이전 댓글 표시
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
James Tursa
2019년 9월 21일
Please clarify what you really have and what you want as a result, because what you have written isn't valid MATLAB syntax.
dinesh kumar mohan
2019년 9월 21일
dinesh kumar mohan
2019년 9월 21일
madhan ravi
2019년 9월 21일
Why not upload the file?
dinesh kumar mohan
2019년 9월 21일
Guillaume
2019년 9월 21일
How is what you're now asking in any way related to your original question?
답변 (1개)
Dheeraj Singh
2019년 10월 3일
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.
카테고리
도움말 센터 및 File Exchange에서 Install Products에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!