octave - octave 支持本地函数吗?
问题描述
我是否更正了 Octave(4.4.0)中不可能的“本地函数”( https://de.mathworks.com/help/matlab/matlab_prog/local-functions-in-scripts.html#bvfvxg0 ),例如:
data = 1:10; %# A vector of data
squaredData = f(data); %# Invoke the local function
function y = f(x)
y = x.^2;
end
我得到错误
error: 'f' undefined near line 2 column 15
解决方案
推荐阅读
- python - python字符串中的奇怪字符
- javascript - 处理错误“预期语法错误;但发现 i”
- javascript - Angular 在 Chrome 中的事件上执行两次函数
- java - MongoDb:Java 中的正则表达式慢
- asp.net - .net core 2上传多个附加到div的图像
- hadoop - avro 格式的 SQOOP IMPORT 失败
- php - php-fpm 7.2:$pool 变量不再有效?
- three.js - 如何在搅拌器的浏览器三个 js 上显示对象?
- javascript - 组件内的Vue.js组件,操作父数据
- r - R - 将重复的行值重塑为列