在matlab中有一个叫做taskset()的函数吗?我已经在网上搜索过了,但是没有找到任何东西?我刚开始使用matlab,我想知道它是否被否决了。我找到了代码这里。
function draw_scheduling(P,cnt_t,cnt_p)
P(cnt_p+1,:)=[];
%disp(P);
task=zeros(4,cnt_t);%row =[task number , start , len , process_no ]
for i=1:cnt_t
[row,col]=find(P==i);
task(1,i)=i;%task number
task(2,i)=col(1);%start
task(3,i)=max(size(row));%len
task(4,i)=row(1);%process_no
end
fprintf('\n Task NO -->');for i=1:cnt_t fprintf('%-6d',task(1,i));end
fprintf('\n Start -->');for i=1:cnt_t fprintf('%-6d',task(2,i));end
fprintf('\n Finish -->');for i=1:cnt_t fprintf('%-6d',task(2,i)+task(3,i)-1);end
fprintf('\n Processor -->');for i=1:cnt_t fprintf('%-6d',task(4,i));end
fprintf('\n len -->');for i=1:cnt_t fprintf('%-6d',task(3,i));end
fprintf('\n');
T1=taskset(task(3,:));
start=task(2,:);
processor=task(4,:);
for i=1:cnt_t
Name_t(i)=cellstr(strcat('T',num2str(i)));
end
T1.Name=Name_t;
add_schedule(T1,'sdsd',start,T1.ProcTime,processor);
get_schedule(T1);
plot(T1);
end发布于 2018-05-13 16:30:36
我通过谷歌搜索TORSCHE调度工具箱找到了add_schedule。看起来这段代码使用了那个工具箱。
https://stackoverflow.com/questions/50317732
复制相似问题