Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Interpolating between vectors to output matrix

2 Ansichten (letzte 30 Tage)
Peter cullen
Peter cullen am 28 Jan. 2014
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Hi,
I have four vectors: - input_nodes which is the input coordinates of my structural portal frame. - Global_Load_vector is the loads at the nodes. For example the first 3 rows correspond to the load at the first node (0,0), the 4th, 5th & 6th node correspond to the load at the second node (0,6) and so on... - sub_nodes vector is the input nodes split up into a number of sub_nodes. - GLV_sub vector is the zero matrix I want to fill. It size is based on the sub_nodes vector x 3 (i.e. 3 loads per node).
Q1: I wish to fill the GLV_sub vector with the values from the Global_load_vector but they must be situated to correspond to the sub_nodes location. Q2: If I have more than the input_nodes specified do I need a loop.
input_nodes =
0 0
0 6
0 6
6 0
Global_Load_Vector =
0
0
0
-5.0000
0.0000
7.5000
-5.0000
0.0000
7.5000
0
0
0
sub_nodes =
0 0
0 1.5000
0 3.0000
0 4.5000
0 6.0000
1.5000 6.0000
3.0000 6.0000
4.5000 6.0000
6.0000 6.0000
6.0000 4.5000
6.0000 3.0000
6.0000 1.5000
6.0000 0
GLV_sub =
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Expected answer:
GLV_sub =
0
0
0
0
0
0
0
0
0
0
0
0
-5
0
7.5
0
0
0
0
0
0
0
0
0
-5
0
7.5
0
0
0
0
0
0
0
0
0
0
0
0
Thanks if you can help.

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by