-
Notifications
You must be signed in to change notification settings - Fork 3
fb_system()
mkraska edited this page Nov 21, 2024
·
4 revisions
-
names
list from thenames
input field -
sys
list of indices of elements which belong to the system (to be active) -
env
list of indices of elements which belong to the environment and have to be deactivated and replaced by reactions -
hint
text, problem-specific hint if the system boundaries aren't correct.
Question variables: Define the lists
i_sys: [....];
i_env: [....];
Question text
[[feedback:System]]
Feedback variables
obj: stackjson_parse(objects);
[txt, OK]: fb_system(names, i_sys, i_env, "");
Feedback:
Field | Value |
---|---|
sans | OK |
tans | true |
feedback true | {@txt@} |
feedback false | {@txt@} |
names[n]="show"
is true if element with index n is activated and false if not.
This can be used to check if all supports or distributed loads are de-activated.
The following snippet from the Feedback variables sets OK to true if the object with number i_beam
are activated and the objects i_S1
, i_S2
and i_S3
are not.
i_beam: 2; i_S1: 5; i_S2: 6; i_S3: 7;
OK: is(
names[i_S1] # "show" and
names[i_S2] # "show" and
names[i_S3] # "show" and
names[i_beam] = "show");
txt: if OK then " Die Systemgrenzen stimmen."
else " Die Systemgrenzen stimmen nicht. Nur der Balken gehört zum System. Mindestens die Stäbe müssen entfernt (deaktiviert) werden.";
Use AlgEquiv question test with OK
as sans
and true
as tans
.
In both branches, say
{@txt@}
In order to try code snippets in jsfiddle,
- copy the code from the wiki page to the clipboard
- follow the link for the JSXGraph version you want to try
- Replace the code in the HTML section (contents of
<p hidden id="init">
) with the content of the clipboard