matlab中的nthroot函数的用法是什么啊?我的英语水平不行,看不懂它的英文解释.为什么我输入nthroot(9,2),matlab会出错.出错提示是Error using ==> nthrootIf X is negative,N must be an odd integer.

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 15:47:35

matlab中的nthroot函数的用法是什么啊?我的英语水平不行,看不懂它的英文解释.为什么我输入nthroot(9,2),matlab会出错.出错提示是Error using ==> nthrootIf X is negative,N must be an odd integer.
matlab中的nthroot函数的用法是什么啊?我的英语水平不行,看不懂它的英文解释.
为什么我输入nthroot(9,2),matlab会出错.出错提示是
Error using ==> nthroot
If X is negative,N must be an odd integer.

matlab中的nthroot函数的用法是什么啊?我的英语水平不行,看不懂它的英文解释.为什么我输入nthroot(9,2),matlab会出错.出错提示是Error using ==> nthrootIf X is negative,N must be an odd integer.
nthroot 就是指 拿x开n次方根
出错提示的意思是:x 如果是负数,那么n 必须是奇数!
(负数不能开偶次方根)
你自己看看是不是输入错了,输入了-9了?
还有,如果只是平方根,就直接sqrt 吧,不需要用nthroot

不明白