اطلاعیه

Collapse
No announcement yet.

درخواست راهنمایی

Collapse
X
 
  • فیلتر
  • زمان
  • Show
Clear All
new posts

    درخواست راهنمایی

    M=csvread('C:\Documents and Settings\mina\Desktop\dat\Arial.dat&#039
    چندتا حرف را با چند فونت نوشتییم وباید به تبدیل شود تا قابل اجرا باشد چه جوری این کار را باید بکنمdat تبدیل به




    %in the name of the most High


    input1=csvread('C:\Documents and Settings\Hamed\Desktop\fooontha\dat\Arial.dat'
    input2=csvread('C:\Documents and Settings\Hamed\Desktop\fooontha\dat\bmitra.dat&#03 9;
    input3=csvread('C:\Documents and Settings\Hamed\Desktop\fooontha\dat\nazanin.dat&#0 39;
    input4=csvread('C:\Documents and Settings\Hamed\Desktop\fooontha\dat\zar.dat'
    input5=csvread('C:\Documents and Settings\Hamed\Desktop\fooontha\dat\TAHOMA.dat&#03 9;
    input6=csvread('C:\Documents and Settings\Hamed\Desktop\fooontha\dat\times.dat'
    input7=csvread('C:\Documents and Settings\Hamed\Desktop\fooontha\dat\font6.dat'
    input8=csvread('C:\Documents and Settings\Hamed\Desktop\fooontha\dat\font7.dat'

    out=input1(:,16);
    mat=input1;
    in1=[mat(:,1),mat(:,2),mat(:,3),mat(:,4),mat(:,5),mat(: ,6),mat(:,7),mat(:,8),mat(:,9),mat(:,10),mat(:,11) ,mat(:,12),mat(:,13),mat(:,14),mat(:,15)];
    mat=input2;
    in2=[mat(:,1),mat(:,2),mat(:,3),mat(:,4),mat(:,5),mat(: ,6),mat(:,7),mat(:,8),mat(:,9),mat(:,10),mat(:,11) ,mat(:,12),mat(:,13),mat(:,14),mat(:,15)];
    mat=input3;
    in3=[mat(:,1),mat(:,2),mat(:,3),mat(:,4),mat(:,5),mat(: ,6),mat(:,7),mat(:,8),mat(:,9),mat(:,10),mat(:,11) ,mat(:,12),mat(:,13),mat(:,14),mat(:,15)];
    mat=input4;
    in4=[mat(:,1),mat(:,2),mat(:,3),mat(:,4),mat(:,5),mat(: ,6),mat(:,7),mat(:,8),mat(:,9),mat(:,10),mat(:,11) ,mat(:,12),mat(:,13),mat(:,14),mat(:,15)];
    mat=input5;
    in5=[mat(:,1),mat(:,2),mat(:,3),mat(:,4),mat(:,5),mat(: ,6),mat(:,7),mat(:,8),mat(:,9),mat(:,10),mat(:,11) ,mat(:,12),mat(:,13),mat(:,14),mat(:,15)];
    mat=input6;
    in6=[mat(:,1),mat(:,2),mat(:,3),mat(:,4),mat(:,5),mat(: ,6),mat(:,7),mat(:,8),mat(:,9),mat(:,10),mat(:,11) ,mat(:,12),mat(:,13),mat(:,14),mat(:,15)];
    mat=input7;
    in7=[mat(:,1),mat(:,2),mat(:,3),mat(:,4),mat(:,5),mat(: ,6),mat(:,7),mat(:,8),mat(:,9),mat(:,10),mat(:,11) ,mat(:,12),mat(:,13),mat(:,14),mat(:,15)];
    mat=input8;
    in8=[mat(:,1),mat(:,2),mat(:,3),mat(:,4),mat(:,5),mat(: ,6),mat(:,7),mat(:,8),mat(:,9),mat(:,10),mat(:,11) ,mat(:,12),mat(:,13),mat(:,14),mat(:,15)];
    inMatGlobal=[in1;in2;in3;in4;in5;in6;in7;in8];


    %normalize input
    %inputNormal=normalizeInput(inMatGlobal);

    for i=1:15
    col=inMatGlobal(:,i);
    mean1=mean(col);
    var1=var(col);
    for j=1:264
    col(j)=(col(j)-mean1)/var1;

    end;
    out2(:,i)=col;

    end;
    inputNormal=out2;

    %method 2 with sqrt
    for i=1:15
    col=inMatGlobal(:,i);
    mean1=mean(col);
    var1=sqrt(var(col));
    for j=1:264
    col(j)=(col(j)-mean1)/var1;

    end;
    out3(:,i)=col;

    end;
    inputNormalSqrt=out3;

    %method 2 with max
    for i=1:15
    col=inMatGlobal(:,i);
    mean1=mean(col);
    mx=max(col)+.1;
    for j=1:264
    col(j)=(col(j)-mean1)/mx;

    end;
    out4(:,i)=col;

    end;
    inputNormalMax=out4;

    %making output of nn
    outMat=-1*ones(33,33);
    for i=1:33
    outMat(i,i)=1;
    end;

    outNormal=[outMat;outMat;outMat;outMat;outMat;outMat;outMat;o utMat];
    %csvwrite('c:\inputNormal.dat',inputNorm al);
    %csvwrite('c:\outputNormal.dat',outNorma l);
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    net = mlp(15, 33, 33, 'linear'

    % Set up vector of options for the optimiser.
    options = zeros(1,18);
    options(1) = 1; % This provides display of error values.
    options(9) = 1; % Check the gradient calculations.
    options(14) = 1000; % Number of training cycles.

    % Train using scaled conjugate gradients.
    [net, options] = netopt(net, options, inputNormal, outNormal, 'scg'

    % Plot the trained network predictions.
    test=inputNormal(33,;
    y = mlpfwd(net, test);
    y'




    لطفا کمک کنید


    اگر می دانستید عوام به ندرت فکر می کنند دیگر قضاوت ها وحرف های عوام برایتان مهم نبود
لطفا صبر کنید...
X