How do I make a function work with vectors?
이전 댓글 표시
I have this function
function tanH = TAN(x)
tanH(x)=((exp(x))-(exp(-x)))/((exp(x))+(exp(-x)))
end
and I need to change it so that I can get answers if x would be a vector. I've tried putting dots but can't get it to work. What should i be doing?
Thanks in advance.
채택된 답변
추가 답변 (1개)
Torsten
2020년 4월 3일
0 개 추천
tanH = (exp(x)-exp(-x))./(exp(x)+exp(-x))
카테고리
도움말 센터 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!