Skip to content

Instantly share code, notes, and snippets.

@BillFoster
Created February 14, 2012 09:21
Show Gist options
  • Save BillFoster/1825152 to your computer and use it in GitHub Desktop.
Save BillFoster/1825152 to your computer and use it in GitHub Desktop.
Display of lists - su below not displayed in latex mode.
{ notes: " Lists to vectors as below. Vectors to lists would be more efficient as could then sum up over subranges i.e. rows and columns"
name: MAS1342 20122013 CBA1a_1
extensions:[stats]
percentPass: 50
shuffleQuestions: false
rulesets:{
std:[all,fractionNumbers, !collectNumbers,!noLeadingMinus]
}
navigation: {
allowregen: true
showfrontpage: false
reverse: true
browse: true
}
feedback: {
showtotalmark: true
}
questions: [
{
name: MAS1342 20122013 CBA1a_1
variables: {
a: "sort(repeat(random(0..1#0.001),m*n-1))"
m:"4"
n:"5"
a1:"a+1"
a0:"[0]+a"
b:"vector(a1)-vector(a0)"
c:"list(b)"
d:"map(c[j*n..((j+1)*n)],j,0..3)"
su:"map(sum(x),x,d)"
ma1:"matrix(d[0],d[1],d[2],d[3])"
ma2:"transpose(ma1)"
tu:"map(sum(list(ma2[j])),j,0..n-1)"
}
statement: """
\[\var{ma1}\]
\[\var{tu}\]
\[\var{su}\]
{su}
"""
parts: [
]
advice: """
"""
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment