how to know the array of the function that i plot
이전 댓글 표시
hi everyone,
i need some a little help to complete my project, it is not hard but when i make the user enter a function in GUI and plot it alone it works but when i try to multiply it with another function it doesnt work.
also how i can know how to find the array that the matlab calculated for my function
thank for you all
댓글 수: 4
Ameer Hamza
2020년 5월 25일
How are you trying to multiply the functions? You cannot multiply function handles in MATLAB, so you need to call the function with input arguments to multiply.
Momen Odeh
2020년 5월 25일
Ameer Hamza
2020년 5월 25일
But how are you converting the string entered in GUI to a function and then multiply them?
Momen Odeh
2020년 5월 25일
채택된 답변
추가 답변 (1개)
Image Analyst
2020년 5월 25일
Make sure you use .* instead of just * alone:
vec1 = function1();
vec2 = function2();
theProduct = vec1 .* vec2;
카테고리
도움말 센터 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!