// Numbas version: finer_feedback_settings {"name": "MATLAB CBA 1 Question 5 (credit: Amy Chadwick)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "b", "c", "d", "f", "g", "h", "j"], "name": "MATLAB CBA 1 Question 5 (credit: Amy Chadwick)", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "
a) $z=x./y$ means that you divide each component of the $x$ vector by the corresponding component of the $y$ vector in order to get $z$.
\ne.g. divide the first element of $x$ by the first element of $y$ and so on.
\nb) $a=z./z$ so you divide each component of $z$ by itself.
", "rulesets": {}, "parts": [{"displayColumns": 0, "prompt": "What is the value of $z$?
", "matrix": ["1", 0, 0, "0"], "shuffleChoices": true, "variableReplacements": [], "choices": ["({a/f}, {b/g}, {c/h}, {d/j})
", "({a/f}, {b/g}, 0, {d/j})
", "({a/f}, {b/h}, {-2}, {d/j})
", "{a/g + b/h + c/h + d/j}
"], "variableReplacementStrategy": "originalfirst", "maxMarks": "1", "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}, {"displayColumns": 0, "prompt": "What is the value of $a$?
", "matrix": [0, "1", 0, 0], "shuffleChoices": true, "variableReplacements": [], "choices": ["({a/f}, {b/g}, {c/h}, {d/j})
", "(1, 1, 1, 1)
", "4
", "(1, 1, {c/h}, 0)
"], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}], "extensions": [], "statement": ">> x = [{a}, {b}, {c}, {d}] ;
>> y = [{f}, {g}, {h}, {j}] ;
>> z = x./y
>> a = z./z
Question 5 of CBA1; Testing vector operations.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Tim English", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/838/"}]}]}], "contributors": [{"name": "Tim English", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/838/"}]}