This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [power,wlength,N_lensp,N_data]=loadIrrDat(fnameL) | |
fid=fopen(fnameL,'rt'); | |
Nskp=5; % for iir file is 60 | |
%dummyStr = fscanf(fid,'%s',(Nskphdr-1)*2); | |
for uilp=1:Nskp | |
[dummyStr] = fgetl(fid); | |
end | |
dummyStr = fgetl(fid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [power,wlength]=loadIrr(fnameL) | |
fid=fopen(fnameL,'rt'); | |
Nskp=5; | |
for uilp=1:Nskp | |
[dummyStr] = fgetl(fid); | |
end | |
dummyStr = fgetl(fid); | |
%[dummyStr,dummyVal] = sscanf(dummyStr,['保存開始波長[nm]' '\t' '%f']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [resultPeak,resultIndex,strmzeroWoPeak] = findpeaksDzone(InDat) | |
Ndat = length(InDat); | |
[sizeC,sizeR] = size(InDat); | |
if Ndat~=(sizeC*sizeR) | |
errMess = sprintf('stream not single vector [%d,%d] ;_;',[sizeC,sizeR]); | |
error(errMess) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [rtnData, headData] = isfread (filename) | |
% * Written 1/25/2009 by Wenwei Qiao * | |
% * modified by Dzone 140624_10:40 * | |
fileID = fopen(filename,'r'); | |
% read ASCII header | |
header_tmp = fread(fileID, 500)'; | |
header = char(header_tmp); | |
headData = parseHead(header); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub FourierTrans | |
Dim oSelFile As Object | |
Dim oSelSheet As Object | |
Dim uiLenStrm As Integer | |
Dim uiLenCoef As Integer | |
Dim uiLenOut As Integer | |
Dim fsumBuff As Double | |
oSelFile = ThisComponent | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub CalcFir | |
Dim oSelFile As Object | |
Dim oSelSheet As Object | |
Dim uiLenStrm As Integer | |
Dim uiLenCoef As Integer | |
Dim uiLenOut As Integer | |
Dim fsumBuff As Double | |
oSelFile = ThisComponent | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Calc_RGB2HSV.c | |
// by Dzone 140725_14:14 | |
#include <stdio.h> | |
void Cacl_RGB2HSV( unsigned int, unsigned int , unsigned int , double *, double *, double *); | |
void Cacl_RGB2HSV( | |
unsigned int uiRed, unsigned int uiGreen, unsigned int uiBlue, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//search_i2c.c | |
//ref to http://playground.arduino.cc/Main/I2cScanner | |
#include <Wire.h> | |
void setup(){ | |
Wire.begin(); | |
Serial.begin(9600); | |
Serial.println("start search i2c"); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function imgOut = myimgrotexif(imgIn, exif) | |
InfoOri = exif.Orientation; | |
dicRot = [0,0,2,2,1,1,3,3]; | |
dicFlip = [0,1,0,1,1,0,1,0]; | |
[sYorg,sXorg,sDepth] = size(imgIn); | |
if(sDepth>1) | |
for uilp =1:sDepth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% myRgb2Hsv.m | |
% by Dzone 150306_14:03 | |
function arryHsv = myRgb2Hsv(arryRgb) | |
% RGB is normalized value (0.0 to 1.0) | |
[sx,sy,sp] = size(arryRgb); | |
red = reshape(arryRgb(:,:,1),sx*sy,1); | |
green = reshape(arryRgb(:,:,2),sx*sy,1); | |
blue = reshape(arryRgb(:,:,3),sx*sy,1); |
OlderNewer