Changeset 5433 for trunk/sources
- Timestamp:
- 02/04/11 19:32:48 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Formatters/SymbolicExpressionTreeMATLABFormatter.cs
r5431 r5433 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 84 84 foreach (string variableName in variableNames) 85 85 stringBuilder.AppendLine(" " + variableName + " = Data(:, ???);"); 86 stringBuilder.AppendLine();87 86 stringBuilder.AppendLine(" for "+CurrentIndexVariable+" = size(Data,1):-1:1"); 88 87 stringBuilder.AppendLine(" Target_estimated("+CurrentIndexVariable+") = " + FormatRecursively(node.SubTrees[0]) + ";"); 88 stringBuilder.AppendLine(" end"); 89 stringBuilder.AppendLine("end"); 89 90 stringBuilder.AppendLine(); 90 91 stringBuilder.AppendLine("function y = log_(x)"); 91 92 stringBuilder.AppendLine(" if(x<=0) y = NaN;"); 92 93 stringBuilder.AppendLine(" else y = log(x);"); 93 stringBuilder.AppendLine( 94 @" 95 function y = fivePoint(f0, f1, f3, f4) 96 y = (f0 + 2*f1 - 2*f3 - f4) / 8"); 94 stringBuilder.AppendLine(" end"); 95 stringBuilder.AppendLine("end"); 96 stringBuilder.AppendLine(); 97 stringBuilder.AppendLine("function y = fivePoint(f0, f1, f3, f4)"); 98 stringBuilder.AppendLine(" y = (f0 + 2*f1 - 2*f3 - f4) / 8;"); 99 stringBuilder.AppendLine("end"); 97 100 return stringBuilder.ToString(); 98 101 }
Note: See TracChangeset
for help on using the changeset viewer.