Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

plz help me to solve this in matlab imp

Status
Not open for further replies.

vibhutesachin

Newbie level 3
Joined
Jan 12, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
dear all
i want to simulate prog in matlab for ofdm papr reduction
statement: i have matrix of 941*1 i wan 2max values from 1st 62 elements then anoter 2 frm next 62 so on..

plz help me its much imp for me
 

Hey, Here is the matlab code, I took the matrix of 15 *1 and tried to find the max values for 1st 6 elements. Just change those parameters in the code:

clc
clear all;
a = [ 1; 5; 6; 3; 6; 9; 8; 4; 5; 8; 0; 0; 0; 0; 1]; % Your vector=941x1
x = length (a);
n = 6; % Need to find the max from 1st numbers, In your case 62

iter = ceil(x/n);

for i=1:iter
max(i) = 0;
if (i==1)
for j = 1: n*i
if (a(j)>max(i))
max(i) = a(j);
end
end

else
for j=n*(i-1)+1:min(n*i,x)
if (a(j)>max(i))
max(i) = a(j);
end
end

end

end



Enjoy.
-sv
 
dear all
i want to simulate prog in matlab for ofdm papr reduction
statement: i have matrix of 941*1 i wan 2max values from 1st 62 elements then anoter 2 frm next 62 so on..

plz help me its much imp for me

I did not understand you very much but what i understood is the following:
%% Function to divide the input sequence to sub sequences
% s2mss - Function
% 1. (s) Input the data
% 2. (hl) Length of the subsequence
% 3. Outpot of the function is an array st(m,v).
% Montadar Abas Taher
% 12/03/2011
function [m outs]=s2mss(cd,hl)
L=length(cd);
Na=0.75*hl;
n=log(hl)/log(2);
Nu=L/(3*2^(n-2));
count=ceil(Nu)-1;
k=[];
s=[];
if L<Na
k=cd;
end
if L>Na
%disp('L > Na is OK here in line 21 of s2mss.m')
for b=0:count

if b==count
[a1 b]=size(k);
a=a1*b;
cdL=length(cd);
subt=cdL-a;
s=cd(end-subt+1:end);
factor=b;
end

try
k(b+1,:)=cd(b*Na+1:Na*(b+1));
end




end
end
sl=length(s);
nsl=b;
ns=[s zeros(1,nsl-sl)];
lns=length(ns);
st=[k;ns];
outs=st;
[m1 v]=size(st);
m=m1;
 
are 2max values that you want should be equal??????????????
 
Last edited:

jakyshan1990 (Re: plz help me to solve this in matlab imp

are 2max values that you want should be equal??????????????)


what do you mean?
 

i mean the two max values he want from every 62 elements ...carry same vaule or ==>frist max value then secoun max smaller than first
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top