Message Boards Message Boards

Script to process statistical data

Posted 9 months ago

I developed a script to process statistical data for people who do not know mathematics. No results appear.

DeclareParameterAndValues[] := 
 Module[{paramName, value}, 
  paramName = InputString["Introduceți numele parametrului: "];
  value = 
   Input["Introduceți lista de valori pentru " <> paramName <> ": "];
  Set[paramName, value];
  Labeled[
   BarChart[Evaluate[Symbol[paramName]], 
    ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel", 
    ImageSize -> 300, ChartLabels -> {"1", "2", "3"}, 
    ChartLegends -> {"1-Martor)", 2 - "Grup1", "3-Grup2"}, 
    LabelStyle -> {FontSize -> 14, FontFamily -> "Courier New", Bold},
     AxesOrigin -> {1.3, 0}, PlotRange -> {{0.12, 3.5}, Automatic}, 
    AxesLabel -> {"", "g"}, AspectRatio -> 0.5, BarSpacing -> 0.2, 
    LabelingFunction -> Bottom], paramName, Bottom]]
POSTED BY: Ion Ganea
3 Replies
Posted 9 months ago

DeclareParameterAndValues[] := defines a function using SetDelayed. You have to evaluate the function. Try evaluating

DeclareParameterAndValues[]
POSTED BY: Rohit Namjoshi
Posted 9 months ago

It's the same result. It doesn't show anything.

Attachments:
POSTED BY: Ion Ganea
Posted 9 months ago

Symbol is not needed, just use paramName. Then it will work as long as the values are input as a List, e.g. {1,2,3}

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract