I have an array A with 100 numerical values. I want to test whether data in A is normally distributed using the Shapiro-Wilk test.
Si I write B = stats::swGOFT(A);
on Matlab command line and I have the error:
??? B = stats::swGOFT(A) Error: Unexpected MATLAB operator.
|
Can someone please help me how can I use stats::swGOFT()
correctly?
swGOFT is a MuPAD library, so you have to execute it from within MuPAD instead of from the MATLAB commandline itself. In the MATLAB commandline, type mupad
and press enter. You'll get the so-called MuPAD notebook, where you can enter your command. And it should be B := stats::swGOFT(A)
as Shai mentions in the comment.
Edit: To bring A
from the Matlab workspace to the MuPAD workspace, you first have to change it into an object of type 'sym'. The steps would be:
S = sym(A)
note = mupad
S
to note
with setVar(note, S)
S
in the MuPAD commands instead of A
, like: B := stats::swGOFT(S)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With