Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.2K Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Fraction as a Coefficient?

Posted 10 years ago

My apologies if this question has been asked before and answered; I was not able to locate an answer by searching the discussions or Google.

I'm putting together random linear equations for Algebra 1 students with this code:

eq1 = HoldForm[y == (f/g) x + b] /. { f -> rise, g -> run, b -> con};

The output is fine except that the variable x automatically becomes part of the numerator of the fraction whereas I would like the rise/run fraction to be formatted as the coefficient of x. In other words, I would like 3/4 x instead of 3x/4. How would I do so?

Thanks in advance,

Mark

POSTED BY: Mark Greenberg

Try this

HoldForm[y == HoldForm[f/g] x + b]
POSTED BY: S M Blinder
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard