1
votes

I get RFM square matrix size(64*64) as function of x and h variable shown below. x = input signal consisting of(pX2),where p can be of any size and h = threshold value (1X1) for each RFMmatrix respectively. x is same constant values for all varying h. let's say for example h will be in this range,h = [0:0.2:1]

RFM = function(x,h)

  • x=rand(100X2) and h_1 = 0 then i will get RFM_1 of (64X64) matrix.
  • x is same, x=rand(100X2) and h_2 = 0.3 then i will get RFM_2 of (64X64) matrix.
  • x is same, x=rand(100X2) and h_3=0.6 then i will get RFM_2 of (64X64) matrix

As of now i have plotted RFM_1 in pcolor plot and also for each RFMvalue i have plotted with pcolor plot.

I want the 3d plot for the RFM matrix in pcolor style with varying function of the h in Z-axis. It should look for each RFM matrix plot is stacked one above the other? How can i do this in MATLAB?

Expected output plot should somewhat look like below. Here,only one RFM_1 with h_1 matrix is plotted in this figure. I expect RFM_2 matrix at h_2=0.5 and so on plotted each withpcolor style. ![enter image description here

I have shared the required code here. You can use test.m file to check the above function. https://drive.google.com/folderview?id=0B0sYDrkkEHQ-b25GMlphUEFRcDA&usp=sharing

1
Please provide a Minimal, Complete, and Verifiable example.excaza

1 Answers

0
votes

here's a way if I understand you correctly:

data=peaks(64); % fake data
t=-0:8; % some thersholds

tdata=bsxfun(@gt,data,permute(t,[3 1 2])); % 3d threshold
data3=repmat(data,[1 1 numel(t)]); %just copy data to the 3rd dim
A=data3.*tdata;
A(A==0)=NaN; % this will eliminate showing the zero values

% plottning
h=slice(A,[],[],1:numel(t));
set(h,'EdgeColor','none','FaceColor','interp');

alpha(0.5);

enter image description here