필터 지우기
필터 지우기

Finding allowed inputs to a function

조회 수: 3 (최근 30일)
James McBrearty
James McBrearty 2022년 4월 28일
댓글: James McBrearty 2022년 4월 28일
Hi All,
Is there any way of programmatically obtaining the allowed inputs in a given Matlab function, more specifically the Name-Value inputs? I'm trying to make a feature engineering App, that allows a user to carry out feature engineering without any coding.
Thanks, James
  댓글 수: 3
Dyuman Joshi
Dyuman Joshi 2022년 4월 28일
Do you mean syntax and allowed input data type?
James McBrearty
James McBrearty 2022년 4월 28일
Hi both, what I mean, is that if I pass in genrfeatures (for example), is it possible for it to return the Name-Value Arguments in a structure, i.e. Target Learner - {"linear","bag","gaussian-svm"}, and so on. So that I can allow a user to select the options that apply to them

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2022년 4월 28일
Not in general. If a function uses the modern arguments block (since R2019b), this is possible. But many users are running older Matlab versions, where these blocks cause errors. Therefore this block cannot be expected to exist yet.
  댓글 수: 1
James McBrearty
James McBrearty 2022년 4월 28일
Hi Jan, I'm developing this in 2022a, and the users that will be using it in my company are using 2022a as well. What I am trying to get is the Name-Value pairs specifically, i.e. if I pass in genrfeatures (for example), is it possible for it to return the Name-Value Arguments in a structure, i.e. Target Learner - {"linear","bag","gaussian-svm"}, and so on. So that I can allow a user to select the options that apply to them.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by