<div dir="ltr">Hi Peter,<div><br></div><div>Thanks very much for pointing me to this example. I like the layout very much. It makes the input easy for students. This would make a nice template for those problems where the dimensions of the matrix were specified in advance.</div><div><br></div><div>Best,</div><div>Justin</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><br></div><div style="color:rgb(102,102,102)">Justin Gray | Senior Lecturer</div><span style="color:rgb(102,102,102)">Department of Mathematics | Simon Fraser University</span><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">8888 University Drive, Burnaby | V5A 1S6 | Canada</span><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">Tel: +1 778.782.4237</span><br></div><div dir="ltr"><span style="color:rgb(102,102,102)"><br></span></div><div dir="ltr"><img src="cid:0786efd7371599bc51452b5fedd54d152d0fae84@zimbra" style="color:rgb(0,0,0);font-family:verdana,helvetica,sans-serif;font-size:16px"><span style="color:rgb(102,102,102)"><br></span></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, May 26, 2015 at 7:45 AM, Peter Riegler <span dir="ltr"><<a href="mailto:p.riegler@ostfalia.de" target="_blank">p.riegler@ostfalia.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Justin,<br>
<br>
maybe<br>
/res/fhwf/riegler/Mathematik/Lineare Algebra/Matrizen/matrix_mit_rang_angeben.problem<br>
could serve as a template.<br>
I agree, the code looks horrible. Essentially it does<br>
1. read out the matrix values from the html textfields<br>
2. make a maxima-formatted matrix out of that<br>
3. compute the rank of that matrix<br>
Steps 2 und 3 are done by getMatrixRang in the library<br>
/res/fhwf/riegler/Mathematik/Lineare Algebra/Libraries/matrix.library<br>
<br>
sub getMatrixRang {<br>
        my ($mat)  = @_;<br>
        my @matrix = @$mat;<br>
        my $str = "matrix(";<br>
        foreach my $ref_zeile (@matrix) {<br>
           my $zeile = join( ',', @$ref_zeile );<br>
           $str .= "[$zeile],"; <br>
        }<br>
       $str =~ s/,$/)/g;        <br>
       $str = "rank($str);";<br>
       $rank = &main::cas('maxima',"$str");<br>
return $rank;<br>
}<br>
<br>
I suppose it should suffice to change the last three lines to<br>
       $checkifidempotent = "is($str . $str = $str);"; # $str is the student provided matrix formatted in maxima<br>
       $isidempotent = &main::cas('maxima',"$checkifidempotent");<br>
and then check whether $isidempotent is "true" or "false".<br>
<br>
Sorry that I don't test the code myself. Other obligations are calling...<br>
<br>
One final comment, though:<span class=""><br>
<br>
On <a href="tel:26.05.2015%2003" value="+12605201503" target="_blank">26.05.2015 03</a>:49, Justin Gray wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
P.S. Ideally, I would like to stipulate that students provide a<br>
nontrivial example (excluding the zero matrix and the identity matrix)<br>
but that is the topic of another discussion.<br>
<br>
</blockquote></span>
I had similar concerns when I specified the "give me an example of a matrix of given rank"-problem on which the above is based. Based on occasional checks it seems that at least in my linear algebra class almost no student comes up with trivial solutions (echelon forms in this case). I guess it takes some familiarity with a concept and some time to be able to come up with trivial solutions.<br>
<br>
Peter<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
Justin Gray | Senior Lecturer<br>
Department of Mathematics | Simon Fraser University<br>
8888 University Drive, Burnaby | V5A 1S6 | Canada<br>
Tel: <a href="tel:%2B1%20778.782.4237" value="+17787824237" target="_blank">+1 778.782.4237</a><br>
<br>
<br>
<br>
<br></span><span class="">
_______________________________________________<br>
LON-CAPA-users mailing list<br>
<a href="mailto:LON-CAPA-users@mail.lon-capa.org" target="_blank">LON-CAPA-users@mail.lon-capa.org</a><br>
<a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users" target="_blank">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a><br>
<br>
</span></blockquote>
<br>
-- <br>
Peter Riegler<br>
Ostfalia Hochschule für angewandte Wissenschaften<br>
Hochschule Braunschweig/Wolfenbüttel<br>
Salzdahlumer Str. 46/48<br>
38302 Wolfenbüttel<br>
<br>
Fakultät Informatik<br>
Fon: <a href="tel:%2B%2B49%205331%20939%2031540" value="+49533193931540" target="_blank">++49 5331 939 31540</a><br>
<a href="http://ostfalia.de/pws/riegler" target="_blank">http://ostfalia.de/pws/riegler</a><br>
<br>
Zentrum für erfolgreiches Lehren und Lernen<br>
Fon: <a href="tel:%2B%2B49%205331%20939%2017200" value="+49533193917200" target="_blank">++49 5331 939 17200</a><br>
<a href="http://www.ostfalia.de/zell" target="_blank">http://www.ostfalia.de/zell</a><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
LON-CAPA-users mailing list<br>
<a href="mailto:LON-CAPA-users@mail.lon-capa.org" target="_blank">LON-CAPA-users@mail.lon-capa.org</a><br>
<a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users" target="_blank">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a><br>
</div></div></blockquote></div><br></div>