How to interpolate a matrix of 1x10 into 18x1800

1 view (last 30 days)
I want to interpolate my matrix having size [1x10] into a size of [18 1800]. I have used the following code, but the interpolation results in data which is very far from the original data. I am trying to find the path loss in free space. I had a previously defined Distance, which has an order [18 1800] (see the code below, you will understand). My reference value of path-loss is: Loss= [-62.6888,-63.2821,-64.1972,-66.766975,-69.8975,-69.3372,-70.6779,-72.39166667,-72.85183333,-73.8708]. The 10 values above indicate values of path loss correspondingly 100 metre away from the mobile tower.
Distance=randi(18,1800);
[min_d,BS_id]=min(Distance); %finding minimum distance min_d and the mobile tower that gives minimum distance
dist=100:100:1000; %distance 100 metre apart
Loss=-[62.6888,63.2821,64.1972,66.766975,69.8975,69.3372,70.6779,72.39166667,72.85183333,73.8708];
newd=interp1(dist,Loss,Distance,'spline');
  2 Comments
Image Analyst
Image Analyst on 5 Jun 2022
Going from 10 columns to 1800 columns is no problem. But what do the 17 extra rows represent?
Moontasir Rafique
Moontasir Rafique on 5 Jun 2022
the extra 17 rows will also have similar values to the first row.

Sign in to comment.

Answers (1)

John D'Errico
John D'Errico on 5 Jun 2022
You can't. That is, you cannot interpolate the singleton dimension into something of size 18.
As a point of comparison, suppose I asked you to interpolate the SINGLE point, say x==1, into a vector of length 18? You can get ANYTHING. Absolutely ANYTHING you want. Interpolation is meaningless here.
Sorry. But no can do.
  2 Comments
Moontasir Rafique
Moontasir Rafique on 5 Jun 2022
What if I change my 18x1800 into a 1x32400 matrix and then interpolate?
Walter Roberson
Walter Roberson on 5 Jun 2022
You can go ahead and do that. You just should not expect to get a useful answer.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!