是否有可能调用不在MATLAB路径中的函数? [英] Is it possible to call a function that is not in the path in MATLAB?

查看:92
本文介绍了是否有可能调用不在MATLAB路径中的函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了一个具有与MATLAB相同名称的函数库。通过安装lib,我的意思是addpath。当我尝试调用这些函数时,它将使用该库的实现,但我想调用MATLAB实现。



为了使它更简单:如何指定要调用哪个函数因为我有这两个函数的绝对地址?



我搜索了答案,但我没有在网站上找到它。


如果你重载了任何MATLAB内置函数来处理特定的类,那么MATLAB总是调用该类型的重载函数。如果出于某种原因需要调用内置版本,则可以使用内置函数覆盖通常的调用机制。表达式

  builtin('reshape',arg1,arg2,...,argN); 

强制调用MATLAB内置函数,重塑,传递显示的参数,即使过载存在于此参数列表中的类。



http://www.mathworks.com/help/techdoc/matlab_prog/br65lhj-1.html


I have installed a library that has some functions with the same name as MATLAB's. And by installing the lib, I mean addpath. When I try to call those function it'll use that lib's implementation but I want to call MATLAB implementation.

To make it simpler: how can I specify which function to call given that I have the absolute address of both functions?

I searched for the answer but I didn't find it on the website.

解决方案

If you overload any of the MATLAB built-in functions to handle a specific class, then MATLAB always calls the overloaded function on that type. If, for some reason, you need to call the built-in version, you can override the usual calling mechanism using the builtin function. The expression

builtin('reshape', arg1, arg2, ..., argN);

forces a call to the MATLAB built-in function, reshape, passing the arguments shown even though an overload exists for the class in this argument list.

http://www.mathworks.com/help/techdoc/matlab_prog/br65lhj-1.html

这篇关于是否有可能调用不在MATLAB路径中的函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆