Troubles with 14x14 matrix

8 views (last 30 days)
leo howard
leo howard on 17 Nov 2016
Commented: leo howard on 18 Nov 2016
I have been creating a 14 by 14 matrix on Matlab to help my assessment, but, when I keyed in the values long hand, I got an answer, yet when I keyed them in shorthand, the matrix produced replaced all the values with 1. Why is this?
<<
>>
  2 Comments
Geoff Hayes
Geoff Hayes on 17 Nov 2016
leo - please clarify what you mean by short hand. Is the code that you have written or some other method? Also, rather than embedding a screen shot of your code, please attach the m-file so that we can more easily understand what it is doing.
leo howard
leo howard on 18 Nov 2016
short hand means, as shown above, creating constants for say mass or inertia, and putting them into the equation

Sign in to comment.

Accepted Answer

Chad Greene
Chad Greene on 17 Nov 2016
It looks like A is classified as a logical variable. Try
A = double(A);
then change the values manually.

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!