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

30 Ansichten (letzte 30 Tage)
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 Kommentare
Kaviya Meena
Kaviya Meena am 31 Mai 2022
Yes, I am already having a matlab file named as feature.m....whether that is cause of this issue
Walter Roberson
Walter Roberson am 31 Mai 2022
yes, I guarantee you that is the cause of the problem.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 31 Mai 2022
which -all feature
will show that you have your own feature.m that is interfering with calling the matlab function feature()
  9 Kommentare
Ravpreet
Ravpreet am 22 Dez. 2022
A Big Thanks to you Sir! Thank you so much

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

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

Kategorien

Mehr zu File Operations finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by