'분류 전체보기'에 해당되는 글 96건

  1. 2013.05.20 flexible electorincs
  2. 2013.05.07 minitab 6sigma
  3. 2013.04.22 1d data interpolation
  4. 2013.04.21 블루스크린 확인
  5. 2013.04.11 Deployment error... ㅜ ㅜ
  6. 2013.04.09 strcat example
  7. 2013.04.06 CONNECT TWO .FIG IN GUI
  8. 2013.04.03 Button에 Running 표시
  9. 2013.04.03 GUI Compile
  10. 2013.04.03 uigetfile / uiputfile
카테고리 없음2013. 5. 20. 16:22

http://erdinckuruoglu.files.wordpress.com/2011/03/flexible-electronics.pdf

Posted by 오늘보다 나은 내일
카테고리 없음2013. 5. 7. 08:58

http://www.q-korea.net/popup/popup_02/sub_main.html

Posted by 오늘보다 나은 내일
카테고리 없음2013. 4. 22. 22:40

x = 0:0.5:10;   y = sin(x);
plot(x,y,'ko-');
hold on
xi = 0:.25:10;
for i=1:size(xi,2)
    yi(i) = interp1(x,y,xi(i)); % default : linear
    % yi(i) = interp1(x,y,xi(i),'spline');
    plot(xi(i),yi(i),'rx');
    pause
end


 

Posted by 오늘보다 나은 내일
카테고리 없음2013. 4. 21. 10:50
 
다운로드

http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx

 
블루스크린 및 기타 원인 확인 
Posted by 오늘보다 나은 내일
카테고리 없음2013. 4. 11. 01:06

MATLAB Compiler generated exe's can't read/use plain m files.

The only way to have interchangeable data is through a file, e.g. mat file.

 

 

Compiled Applications Do Not Process MATLAB Files at Runtime

The MATLAB Compiler was designed so that you can deploy locked down functionality. Deployable MATLAB files are suspended or frozen at the time MATLAB Compiler encrypts them—they do not change from that point onward. This does not mean that you cannot deploy a flexible application—it means that you must design your application with flexibility in mind. If you want the end user to be able to choose between two different methods, for example, they both must be compiled in.

The MCR only works on MATLAB code that was encrypted when the component was built. Any function or process that dynamically generates new MATLAB code will not work against the MCR.

Some MATLAB toolboxes, such as the Neural Network Toolbox™ product, generate MATLAB code dynamically. Because the MCR only executes encrypted MATLAB files, and the Neural Network Toolbox generates unencrypted MATLAB files, some functions in the Neural Network Toolbox cannot be deployed.

Similarly, functions that need to examine the contents of a MATLAB function file cannot be deployed.HELP, for example, is dynamic and not available in deployed mode. You can use LOADLIBRARY in deployed mode if you provide it with a MATLAB function prototype.

Instead of compiling the function that generates the MATLAB code and attempting to deploy it, perform the following tasks:

  1. Run the code once in MATLAB to obtain your generated function.

  2. Compile the MATLAB code with MATLAB Compiler, including the generated function.

Tip: Another alternative to using EVAL or FEVAL is using anonymous function handles. If you require the ability to create MATLAB code for dynamic run time processing, your end users must have an installed copy of MATLAB.

 

 

 

The only way is using mat file...

 [FileName,PathName] = uigetfile('*.mat','Prepare mat file'); % a is in the .mat file

fullname = fullfile(PathName,FileName);

load(fullname) 

set(handles.text1,'String',num2str(a(1:end)))

 

 

 

Posted by 오늘보다 나은 내일
카테고리 없음2013. 4. 9. 22:25

clear all clear clc

 

rasio = 0.6; x = [1 7]; delx = [0.1 0.1]; tol = [0.001 0.001]; n=length(x); Fopt=fungsi(x(1),x(2)); xopt=x;F=Fopt; disp([xopt Fopt])


%checking delta


chekdel=strcat('if delx(1)<=tol(1)&delx(2)<=tol(2);','disp([xopt Fopt]);'...

    ,'disp(delx);','else;','del=delx*rasio;','delx=del;','eval(eksplorasi);'...

    ,'end;');


%repeating success step


ulsuk=strcat('while Fopt<F;','disp([xopt Fopt]);','for i=1:n;',... 

    'x(i)=xopt(i)+delx(i)*tanda(i);','end;','F=fungsi(x(1),x(2));',... 

    'if F<=Fopt;','xopt=x;', 'Fopt=F;','else;','break;','end;','end;',... 

    'eval(eksplorasi)');


%exploration:


eksplorasi=strcat('for ep=1:n;','tanda(ep)=0;','x(ep)=xopt(ep)+delx(ep);',... 

    'Fd=fungsi(x(1),x(2));','if Fd<=Fopt;','xopt(ep)=x(ep);','Fopt=Fd;','tanda(ep)=1;',... 

    'else;','x(ep)=xopt(ep)-delx(ep);','Fd=fungsi(x(1),x(2));','if Fd<=Fopt;',... 

    'xopt(ep)=x(ep);','Fopt=Fd;','tanda(ep)=-1;','end;','end;','end;','disp([xopt Fopt]);',... 

    'if abs(tanda(1))>0|abs(tanda(2))>0;','eval(ulsuk);','else;','eval(chekdel);',... 

    'end;'); eval(eksplorasi);




Posted by 오늘보다 나은 내일
카테고리 없음2013. 4. 6. 00:31

The handle structure for GUI created with GUIDE are stored in the figure object for the main GUI menu.

gui1fig = open('FirstGui.fig');
gui2fig = open('SecondGui.fig');

Then if the first GUI needs to reference a handle that exists in the second GUI,

handles2 = getappdata(gui2fig);

and access handles2.TheHandleName

If need be, the second handles structure can be updated from the first GUI by using

setappdata(gui2fig, handles2)

Posted by 오늘보다 나은 내일
카테고리 없음2013. 4. 3. 22:32

function [] = pb_call(varargin)

h = varargin{1}; % Get the caller's handle.

col = get(h,'backg');  % Get the background color of the figure.

set(h,'str','RUNNING...','backg',[1 .6 .6]) % Change color of button. 

% The pause (or drawnow) is necessary to make button changes appear.

% To see what this means, try doing this with the pause commented out.

pause(.01)  % FLUSH the event queue, drawnow would work too.

% Here is where you put whatever function calls or processes that the

% pushbutton is supposed to activate. 

% Next we simulate some running process.  Here just sort a vector.

A = rand(30000000,1);

A = sort(A); %#ok 

set(h,'str','Push Me','backg',col)  % Now reset the button features.

Posted by 오늘보다 나은 내일
카테고리 없음2013. 4. 3. 11:10

deploytool 을 사용하면 쉽게 standalone file 생성 가능

Posted by 오늘보다 나은 내일
카테고리 없음2013. 4. 3. 00:42

!----------------------------------------------------------

! uigetfile

!----------------------------------------------------------

[file_name,file_path] = uigetfile('*.txt','Select Input File');
if (file_name ~=0)
    full_name=sprintf('%s%s',file_path,file_name);
    fid=fopen(full_name,'rw');
    data=fscanf(fid,'a %g %g %g %g ',[4,inf]);
    data=data';
    fclose(fid);   
else
    return
end

 

!----------------------------------------------------------

! uiputfile

!----------------------------------------------------------

[file_name,file_path] = uiputfile('*.txt','Save data As');
if (file_name ~=0)
    full_name=sprintf('%s%s',file_path,file_name);
    fid=fopen(full_name,'rw');
    fprintf(fid,'%d %d %d \n',data' );
    fclose(fid);   
else
    return
end

 

!----------------------------------------------------------

! multiple file select

!----------------------------------------------------------

[file,path] = uigetfile('*.txt','load data file','Multiselect','on');

 

!----------------------------------------------------------

! data in out

!----------------------------------------------------------

data=load('file_name.txt');

file_name = sprintf('%d.txt',str2double('xxxxxxx'));

 

 

t=linspace(0:100:100); 

f=@(t) 10*exp(-0.25*t).*sin(t-4);

 

Posted by 오늘보다 나은 내일