How to Have a User Input a Matlab Function?
조회 수: 9 (최근 30일)
이전 댓글 표시
Hello! I need to writea script that has a user enter the name of any trigonemtric function that will be used to find the sin,cos,tan,etc of an array. How would I go about doing this? Right now I just have:
n=input('Please input a positive number n: ');
b=input('please enter a trigonemtric function name (cos,sin,tan,etc.): ','s');
x=linspace(0,n,1000)
Thank you and any help is much appreciated!
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Numeric Types에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!