attempt to execute script varargin as a function

2 ビュー (過去 30 日間)
Selyn
Selyn 2014 年 8 月 11 日
編集済み: Andy L 2014 年 8 月 11 日
Hi, I have a problem, I have a function [region_parts, orig_sp, varargout] = spagglom (I_rgb, opts, varargin) and run in this way [A, B, C] = spagglom (1449, 'opts', varargin) , but it is saying the following error: Attempt to execute SCRIPT varargin as a function: C: \ Program Files \ MATLAB \ R2011b \ toolbox \ matlab \ lang \ varargin.m how can I fix it? Also can you tell me how to add VOC2012 at matlab? thank you
I apologize for the errors

回答 (2 件)

Andy L
Andy L 2014 年 8 月 11 日
編集済み: Andy L 2014 年 8 月 11 日
Try
[A, B, C] = spagglom (1449, 'opts', IN)
Where IN is an array of your variable number or arguments. Similar to what you have done with C for your varargout statement.
varargin is a function, which should be replaced by a variable when you call your function.
Also try reading the documentation for more clarification - varargin.
  1 件のコメント
Andy L
Andy L 2014 年 8 月 11 日
I don't know about VOC2012 though

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


Selyn
Selyn 2014 年 8 月 11 日
the first argument of spagglom is I_rgb , that is a image , but even if I do not go so ,[region_parts, orig_sp, varargout] = spagglom(image.jpg, 'opts', varargin)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by