Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.9K Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

[?] Plot 2-D linear combinations with general coefficients?

Posted 9 years ago
Attachments:
POSTED BY: Arthur Hill
4 Replies
POSTED BY: EDITORIAL BOARD
Posted 9 years ago
POSTED BY: Arthur Hill

If you enclose s {2, 4}, (1 - s) {4, 2} within braces, it becomes a 2 by 2 matrix, not a vector. If you want a linear (convex) combination of the vectors {2,4} and {4,2} you should combine them with a plus sign:

Graphics[Table[
  Arrow[{{0, 0}, s {2, 4} + (1 - s) {4, 2}}], {s, 0, 1, 0.025}]]
POSTED BY: Gianluca Gorni

I think you should remove the extra curly braces:

Graphics[Table[
  Arrow[{{0, 0}, s {2, 4}, (1 - s) {4, 2}}], {s, 0, 1, 0.025}]]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard