2019년 8월 24일 토요일

Matlab 글꼴 변경시 글꼴 목록에 안나타 나는 경우

  matlab 기본 글꼴인 monospaced는 I, L의 구분이 불편하고 0, o구분이 불편한 경우가 있습니다. 가독성 향상을 위해 네이버에서 제공하는 D2 coding이나, 나눔코딩글꼴을 설치하면 가독성을 향상 시킬 수 있습니다.


https://developers.naver.com/opensource/tools/editor/
https://github.com/naver/d2codingfont

  위의 사이트를 이용하여 글꼴을 다운로드 할 수 있습니다.
이 때 글꼴을 추가할 때 윈도우10의 경우 글꼴파일을 모든 사용자가 이용가능 으로 추가해주셔야 MATLAB글꼴목록에 정상적으로 나타나게 됩니다.


  MATLAB에서의 설정은 위의 그림과 같이 [홈] - [기본 설정] - [글꼴] - [D2Coding] - [확인] 을 눌러주시면 됩니다.

  D2coding과 D2coding ligature의 차이는 !=, <=등의 글자를 하나로 모아써주는 기능이나 matlab에서는 지원되지 않으며 필요도 없습니다..

2019년 5월 24일 금요일

matlab pointer doesn't help speed up

function main()
t = 0:0.03:100;
t_size = length(t);
data_y = randn(1,t_size);
p_t = libpointer('doublePtr',t);
p_data_y = libpointer('doublePtr',data_y);
tic
disp(p_data_y.Value(1));
disp(data_y(1));
toc

tic
changePtrValue(p_data_y);
disp(p_data_y.Value(1));
toc

tic
data_y1 = changeValue(data_y);
disp(data_y1(1));
toc

clear p_t
clear p_data_y
end

function changePtrValue(p_data)
p_data.Value(1) = 1;
for i = 1:numel(p_data.Value)
p_data.Value(i) = p_data.Value(i)+1;
end
end

function data_out = changeValue(data_in)
data_out = data_in;
data_out(1) = 2;
for i = 1:numel(data_out)
data_out(i) = data_out(i)+1;
end
end
---------------------------------------------------------------------------------------------------
result
using ptr: 0.113141 sec
nomar way: 0.000728 sec

matlab already has good way. they don't need the pointer for speed up.

[Visual Studio] 구글테스트 Inherited Additional Dependencies 변경

구글테스트에 Configuration을 추가하는 경우 정상적인 빌드가 되지 않는 문제 발생 상황: Test 명칭으로 Configuration을 새로 추가하였음 원인: 다음그림과 같이 Inherited values에 debug용이 아닌 release...