0

次の関数はコマンドラインで機能しますが、クラスでは定数プロパティとして機能しません。一体型の他の機能との組み合わせなどいろいろ試してみましたが解決できませんでした。 関数

         enthalpyChange =  @(constants, temperatureIn, temperatureOut)integral(@(temperature)...
       F.heatCapacityOfLiquid(constants,temperature), temperatureIn,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, temperatureIn, temperatureOut)integral(@(temperature)...
           F.heatCapacityOfLiquid(constants,temperature), temperatureIn,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
4

0 に答える 0