The function should take two inputs: 1) a string containing the subject's code 2) a vector of 5 sco"/> The function should take two inputs: 1) a string containing the subject's code 2) a vector of 5 sco"/> The function should take two inputs: 1) a string containing the subject's code 2) a vector of 5 sco"/> The function should take two inputs: 1) a string containing the subject's code 2) a vector of 5 sco"/>
Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (anonymous):

Some MATLAB help needed Write a function named "week1" > The function should take two inputs: 1) a string containing the subject's code 2) a vector of 5 scores >The function should return two values: 1) the mean of the 5 scores, after removing the lowest one 2) the standard error of the mean of the 5 scores after removing the lowest one > The function should also do the following when run: 1) print the following line to the screen "Working on subject XXXX..." where XXXX is the subject code 2) plot a bar graph with the 5 scores

OpenStudy (anonymous):

@ganeshie8 @hartnn @UnkleRhaukus

ganeshie8 (ganeshie8):

you have @UnkleRhaukus also add @dan815 :)

OpenStudy (anonymous):

Thanks, I really can't think of a code now!

OpenStudy (anonymous):

@Kainui

OpenStudy (dan815):

SE = s/sqrt(n)

OpenStudy (dan815):

where s is the sample standard deviation, and n is the number of samples

OpenStudy (anonymous):

math part is fine dan :)

OpenStudy (dan815):

2) the standard error of the mean of the 5 scores after removing the lowest one for this part do you still want to use all 5 scores to find your SE just with the mean of 4 highest scores now

OpenStudy (anonymous):

Actually main problem is the defining function for getting a string as input

OpenStudy (dan815):

function out=method(string,vector)

OpenStudy (anonymous):

ok, so how is this function [mean, error]=week1(a,b)

OpenStudy (dan815):

ya

OpenStudy (anonymous):

function [mean, error]= yourInitials_week1(a,b) mean = length(a); error=length(b); when I run it says: ??? Input argument "a" is undefined. Error in ==> yourInitials_week1 at 2 mean = length(a);

OpenStudy (dan815):

what did u input for a

OpenStudy (anonymous):

still nothing when I call function this error comes up

OpenStudy (anonymous):

>> yourInitials_week1 ??? Input argument "a" is undefined. Error in ==> yourInitials_week1 at 2 mean = length(a);

OpenStudy (dan815):

can u please answer this question for me xD

OpenStudy (dan815):

" 2) the standard error of the mean of the 5 scores after removing the lowest one for this part do you still want to use all 5 scores to find your SE just with the mean of 4 highest scores now "

OpenStudy (anonymous):

4 highest

OpenStudy (dan815):

ok

OpenStudy (dan815):

function [mean1, SE]= yourInitials_week1(subcode,vector) vector=sort(vector) vector1=vector(2:length(vector)) mean1=mean(vector1) SE=std(vector1)/sqrt(length(vector1)) display (subcode) bar(vector)

OpenStudy (dan815):

maybe you should code the std function yourself

OpenStudy (anonymous):

Oh thanks, let me work on it a little

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!