How to get z for different x
이전 댓글 표시
x = [-2:0.1:2];
z=x.*(1-x).*(2-x).*(4-x)/((6-x)-(1-x).*(x-7));
I am getting error. Please correct my problem.
댓글 수: 2
Thomas
2012년 12월 18일
what error are you getting? what answer do you expect?
채택된 답변
추가 답변 (2개)
Thomas
2012년 12월 18일
x = [-2:0.1:2];
z=x.*(1-x).*(2-x).*(4-x)./((6-x)-(1-x).*(x-7))
You missed the . before the division to do element by element division
Daniel Shub
2012년 12월 18일
0 개 추천
Presumably you want to use ./ instead of /, just like you are using .* instead of *
카테고리
도움말 센터 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!