how to include both the positive and negative sign for a given expression

I am working on inverse kinematic problem for a planar 3r robot where i needed to include the following expression.
i am not able to figure out how to incorporate +,- sign to the expression.
any help in this regard is appreciated

5 Comments

Hi Prajwal, I do not clearly understand the expected outcome of the problem statement. In my understanding this problem could be either printing the expression in laTex or Tex, or actually involve computing aspect of MATLAB to compute theta2. It will be helpful for the community to address your problem if the problem statement is clearly mentioned.
Hi Rohan, the question was on computing aspect of theta 2.not the laTex part. Hope this clear's the question.
Jut compute it without the sign then add the negation of the result too, e.g.
theta2 = ...
theta2 = [1 -1] .* theta2
or
theta2 = [theta2 -theta2];
To be clear: MATLAB does not have a ± operator so you have to do the equivalent yourself.
thank you sir. this answered my question

Sign in to comment.

Answers (0)

Categories

Find more on Aerospace Blockset in Help Center and File Exchange

Asked:

on 14 Feb 2020

Commented:

on 3 Apr 2020

Community Treasure Hunt

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

Start Hunting!