I want to resample an array of elements using the command idresamp(). The input arguments for idresamp function is an array x. So I should get the output as an array. However, I am getting a structure iddata. I don't know how to access the elements /result of the resampling. Can somebody please show how to access the resampled values? Thank you.
x=rand(4000,1); %create some arbitrary data
x_resamp =idresamp(x,2); %resampling factor is 2
Here x_resamp is of iddata type. So, I am unable to access the result. On clicking the variable x_resamp this is what I got
How does one access the resampled values (output). Where is the array? The next step is to calculate the power after resampling and hence I need to use the resampled values.
I am using Matlab R2018a.

iddata? Alternatively, useresample, which returns a normal array. - Cris Luengodata.InputDataordata.OutputData, depending on which data you want to get out. It seems you have only output data in your object? - Cris Luengoresamplebut could not understand what should be the value of the parameter if I want to resample by 2 as there are 2 arguments in this function. For the second comment, I only have output data in my object. So, what should I do? - Srishti Mresampleth lineur = resample(u,3,2);means thatP=3andQ=2which should resample the dataubyQ/P = 2/3according to the documention. But the explanation under the example says: "Increase the sampling rate of data by a factor of 1.5 and compare the resampled and the original data signals." To get the sampling factor of 1.5 we should be doingP/Qand notQ/P. Therefore, the explanation on how to mention the sampling factor is not clear. - Srishti M