问题描述
以下功能在命令行上有效,但是在类中不能作为常量属性使用。我尝试了很多其他功能,例如集成其他功能等,但无法解决。 功能
enthalpyChange = @(constants,temperatureIn,temperatureOut)integral(@(temperature)...
F.heatCapacityOfLiquid(constants,temperature),temperatureOut);
课堂上
classdef F
%FORMULAS Summary of this class goes here
% Detailed explanation goes here
properties (Constant)
%F.heatCapacityOfLiquid
t = @(z) z *2
end
properties (Constant)
enthalpyChange = @(constants,temperatureOut)integral(@(temperature)...
F.heatCapacityOfLiquid(constants,temperatureOut);
heatCapacityOfLiquid = @(constants,temperature) constants(1)...
+ temperature * constants(2)...
+ temperature.^2 * constants(3)...
+ temperature.^3 * constants(4);
% heatCapacityOfLiquid = @F.HeatCapacityOfLiquid
end
methods (Static)
function val = HeatCapacityOfLiquid(constants,temperature)
formula = @(constants,temperature) constants(1)...
+ temperature * constants(2)...
+ temperature.^2 * constants(3)...
+ temperature.^3 * constants(4);
val = formula(constants,temperature);
end
end
end
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)