how do I plot this anonymous function?
이전 댓글 표시
Hi i can't seem to figure this problem out and i thought i should ask someone.
When i make the anonymous function: MyFunct = @x 3*x^2 - 2*x + 5
I don't exaclty know how to approach this problem when it comes to plotting it. I'm trying to set the x-range to [-6:1:6] and I'm trying to call my anonymous function(MyFunct) into the y-value for the plot. how would i go about writing these lines code to plot this function?
Thanks
답변 (1개)
Torsten
2016년 4월 26일
f=@(x)3*x.^2 - 2*x + 5;
fplot(f,[-1 1]);
Best wishes
Torsten.
댓글 수: 1
yaswanth gaddipati
2020년 10월 21일
Thanks Torsten!
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!