adding zeros to empty matrix cells in Stack

adding zeros to empty matrix cells in Stack

by Danny Klevenow -
Number of replies: 1

Hey all, 

we are currently making questions in Stack for students of mechanical engineering. 

We let the students type the system equations for static mechanical problems into matrix cells. (6x6 for 3D Problems). 

A lot of those cells need to be zero tho. to make it easyier to type, we’d like to fill all empty cells with zeros or at least fill all the cells with zeros from the beginning. 

i cant seem to find the answer for this problem. we tried to substitute the „empty“ cell with zeros. but we cannot get the variable of the empty cell to tell maxima to substitute it with zero. 

can anyone help with that? 

greetings 

Danny

Average of ratings: -
In reply to Danny Klevenow

Re: adding zeros to empty matrix cells in Stack

by Christopher Sangwin -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Danny,

Yes, this is exactly what the "syntax hint" field in the input is for.  Fill it in with something like matrix([?,0,0],[0,0,0],[0,0,0]) (well, you have a 6*6 version)

You might, as I have done, want to put in at least one ? to make this an "invalid" response, otherwise a student who navigates away might have their matrix marked as "wrong" (depending on your settings and penalty scheme).  It is generally sensible to make a syntax hint "invalid" as strange as this might sound at first reading...

Chris