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

30 ビュー (過去 30 日間)
Kaviya Meena
Kaviya Meena 2022 年 5 月 31 日
回答済み: vasanthkumar 2023 年 2 月 21 日
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 日
yes, I guarantee you that is the cause of the problem.

サインインしてコメントする。

採用された回答

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 件のコメント
Ravpreet
Ravpreet 2022 年 12 月 22 日
A Big Thanks to you Sir! Thank you so much
Ravpreet
Ravpreet 2022 年 12 月 22 日
It works.

サインインしてコメントする。

その他の回答 (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 Center および File ExchangeFile Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by