function [ f ] = closure( base ) function [ans] = h(t) ans = base + t; end f = @h; end
简单的测试了下,确实Matlab支持闭包- -
Powered by: 博客园 Copyright © 2024 1957 Powered by .NET 8.0 on Kubernetes