Getting "Execution of script feature as a function is not supported "
显示 更早的评论
For the below code I got an error as execution of script feature as a function is not supported. Could anyone please help me to get out from this error. My code is
function [dataset,classes ] = load_dataset(file_name)
dataset = readtable(filename,'TextType','string');
classes = "Result";
dataset= convertvars(dataset,classes,'categorical');
if ~isempty(dataset)
disp('Dataset has been loaded')
end
6 个评论
Cris LaPierre
2022-5-31
I inserted line feeds to make it easier to read the code withough having to scroll
Kaviya Meena
2022-5-31
Walter Roberson
2022-5-31
That's fine but the problem is the extra feature.m that you have.
Kaviya Meena
2022-5-31
Walter Roberson
2022-5-31
yes, I guarantee you that is the cause of the problem.
采纳的回答
更多回答(1 个)
vasanthkumar
2023-2-21
0 个投票

Hi, i am using MATLAB 2022b offline i am facing this issue as file attached below , please help me out.
类别
在 帮助中心 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
