Multiplying a cell array element with an element of a matrix gives wrong result

I have a cell array element: (a - 1)*(a - 4)
And I have a number: 0.0833
When I try to multiply them:
cellarray{this} * matrix(that)
, the result is
((a - 1)*(a - 4))/12
The expected result would be
(a - 1)*(a - 4)*0.0833
(or the calculated equivalent), but it isn't. What could be the problem and how can I achieve what is wanted?

Answers (1)

cellarray{this} * vpa(matrix(that))

2 Comments

That's perfect! Except it display an insane amount of digits (0.08333333...), how can I limit that to like 4?

Sign in to comment.

Categories

Find more on Operators and Elementary Operations in Help Center and File Exchange

Products

Release

R2023b

Asked:

on 20 Nov 2023

Commented:

on 20 Nov 2023

Community Treasure Hunt

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

Start Hunting!