Working With Cosine In a Matrix

2 次查看(过去 30 天)
I'm trying to work with cosines in a matrix (For the Freudenstein Equation)but but then am getting a pretty consistent error. Here's the line that has a problem:
TermA = [cos(precOutputAngle1Rad),(-cos(precInputAngle1Rad)),1;
cos(precOutputAngle2Rad),(-cos(precInputAngle2Rad)),1;
cos(precOutputAngle3Rad),(-cos(precInputAngle3Rad)),1];
The error just reads 'Error in FindTransmissionAngles (line 3)' and the line in bold is the said line. I'm thinking the error is something obvious so Id like someone to point out to me and Id really appreciate that.
NB: dpb edit to format the code line removed bold to introduce code format but did not change anything other than spacing for legibility...
  5 个评论
Guillaume
Guillaume 2018-7-16
Edwin, as per Stephan's initial request, give us the full text of the error message. Everything in red.
So far, we know that the line produces an error, but the important bit that tells us why it produces an error, you haven't given us.
Edwin Macharia
Edwin Macharia 2018-7-16
I regret my lack professionalism; I came here in a haste. Anyway, I have somehow solved the error. Unfortunately I was not able to identify the problem but the comments helped me narrow down the problem my definition of the variables. For that, am really grateful.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

产品


版本

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by