evaluation error

evaluation error

by hesham el-touney -
Number of replies: 2

I'm trying to add algebraic formula that includes sin and cos derivative, but, I keep getting evaluation error, not sure why, please check the photos and xml 


Attachment Screenshot 2020-09-04 12.35.32.png
Average of ratings: -
In reply to hesham el-touney

Re: evaluation error

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Hesham,

In the Global variables, use the ** operator or the pow() function, not ^, for exponentiation. See the documentation for operators ↗ or for functions ↗.

The rest is fine. In the local variables, you have correctly defined a range of values of x to ensure that the answer given by the student is correct, at least on this range.

See as an example the derivative of a simple function of x ↗:

Formulas_20200904_1444.png

In reply to Dominique Bauer

formula combined with (short answer and multiple choice)

by hesham el-touney -

I'm trying to use a combination of a formula, short answer, and multiple choice to answer MATLAB questions on matrix elements and manipulation. The code includes the following:

1. Definition of the local variables (first element for each row in the matrix and step size in each row)

2, definition of the global variables that includes the remaining elements in each row and answers for questions 1 to 7

3. Question (a), I want to use a short answer option (not sure how), with the answer as follows [a31*ones(1,5),a36*ones(1,4)]

4. Question (b), same as question (a), but the answer is linspace(a21:a29:9), again I need to now how to use the short answer option

5. Questions (c), (d), and (e) are working fine

6. Question (f) I couldn't use mean(A'), which is the correct answer

7. Question (g) for some reason the : is not showing

appreciate your help and time