Getting "Execution of script feature as a function is not supported "

91 次查看(过去 30 天)
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 个评论
Kaviya Meena
Kaviya Meena 2022-5-31
Yes, I am already having a matlab file named as feature.m....whether that is cause of this issue

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2022-5-31
which -all feature
will show that you have your own feature.m that is interfering with calling the matlab function feature()
  9 个评论

请先登录,再进行评论。

更多回答(1 个)

vasanthkumar
vasanthkumar 2023-2-21
Hi, i am using MATLAB 2022b offline i am facing this issue as file attached below , please help me out.

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by