Matlab中是否存在taskset()函数?该函数是否已被弃用?
taskset()函数的说明 Hey there! As someone new to MATLAB, it makes total sense to be confused about this—let's clear it up:
taskset()is not a native MATLAB function
You won't find it in MathWorks' official documentation, either in current MATLAB releases or archived older versions. It's never been part of MATLAB's core toolbox or any official add-on.What is it, then?
Thetaskset()in your code is almost certainly a custom user-defined function or part of a third-party toolbox/academic codebase. Looking at your code snippet, it's used to create a scheduling object (since you later set properties like.Nameand use functions likeadd_schedule,get_schedule, andplot()on it). This whole workflow looks like it's part of a custom tool for visualizing task scheduling algorithms.How to get your code working?
- Double-check if you missed downloading a companion
taskset.mfile along with the code snippet—custom functions need to be in MATLAB's working directory or path to run. - If you can't find the original
tasksetimplementation, you might need to build it yourself based on what the code expects: it takes task duration values (task(3,:)) and returns an object that supports properties like.ProcTimeand methods likeadd_schedule. - The other functions (
add_schedule,get_schedule) are also non-native, so you'll need the full set of custom files from the original code source.
- Double-check if you missed downloading a companion
内容的提问来源于stack exchange,提问作者mtalbquestion 1

