How do I build a matlab function, with two inputs?

47 Ansichten (letzte 30 Tage)
Luke Muscat
Luke Muscat am 28 Apr. 2019
Beantwortet: Image Analyst am 28 Apr. 2019
The two inputs are the observed data and the level of significance. function must compute the chi squared test and deduce which hypothesis to accept.
the data of the the observed data given in my quesion is non numeric, it is comparing two variables, 3 levels for each variable. and the values are n11,n21,n31 (1st row), n21 n22 n23 (second row), n31 n32 n33 (third row). and then the total of the rows and total of columns for level of significance.
Thanks in adavnace

Antworten (1)

Image Analyst
Image Analyst am 28 Apr. 2019
This is super basic stuff so I'd recommend you read up on how to create functions in MATLAB. In the meantime, it would be something like
function output = YourFunction(input1, input2)
% Now code to do something with input1 and input2 and create output.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by