Info

This question is closed. Reopen it to edit or answer.

Interpolating between vectors to output matrix

1 view (last 30 days)
Peter cullen
Peter cullen on 28 Jan 2014
Closed: MATLAB Answer Bot on 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.

Answers (0)

Community Treasure Hunt

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

Start Hunting!