Insert two vectors to an output with text

1 Ansicht (letzte 30 Tage)
Kasper Jørgensen
Kasper Jørgensen am 25 Apr. 2015
Bearbeitet: Jan am 25 Apr. 2015
Hello! I have to set of vectors, that represents a force and a position.
The force vector: F = [10 20 30]
The position vector: P = [2 4 6]
I want it to show a message that shows all of the current forces relative to the position.
Something like this:
Force 1. Force = 10 N. Position: 2 m
Force 2. Force = 20 N. Position: 4 m
...
There will be added more forces and positions sometimes, so it needs to be able to show for the total length of the vectors.
I hope some of you can assist me, on how to do this. Thanks in advance!
  1 Kommentar
Jan
Jan am 25 Apr. 2015
Bearbeitet: Jan am 25 Apr. 2015
To assist you we should see what you have tried so far. The solution is a FOR loop and one FPRINTF command.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by