Clear Filters
Clear Filters

Working With Cosine In a Matrix

2 views (last 30 days)
Edwin Macharia
Edwin Macharia on 15 Jul 2018
Commented: Edwin Macharia on 16 Jul 2018
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 Comments
Guillaume
Guillaume on 16 Jul 2018
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 on 16 Jul 2018
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.

Sign in to comment.

Answers (0)

Products


Release

R2016a

Community Treasure Hunt

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

Start Hunting!