function [R,k,b] = msc(A) % 多元散射校正 % 輸入待處理矩陣,通過多元散射校正,求得校正后的矩陣 %% 獲得矩陣行列數 [m,n] = size(A); %% 求平均光譜 M = mean(A,2); %% 利用最小二乘法求每一列的斜率k和截距b for i = 1:n a = polyfit(M,A(:,i),1); if i == 1 k = a(1); b = a(2); else k = [k,a(1)]; b = [b,a(2)]; end end %% 求得結果 for i = 1:n Ai = (A(:,i)-b(i))/k(i); if i == 1 R = Ai; else R = [R,Ai]; end end
上傳時間: 2020-03-12
上傳用戶:15275387185
P P I I CK I I T T3 3 使用 說明--- - 連機 、 脫 機操作試用 MPLAB IDE 軟件一 、 P P I I C CK K I I T3 接 口說 明, , 硬 件 二 、 P P I I C CK K I I T3 連 接 電腦 MPL L AB I I DE 聯機三 、 聯機四 、聯機讀芯片程序五 、 脫機 燒寫 調試
上傳時間: 2022-03-24
上傳用戶:
簡單電子琴的51單片機程序 #include<reg51.h> //包含51單片機寄存器定義的頭文件 sbit P14=P1^4; //將P14位定義為P1.4引腳 sbit P15=P1^5; //將P15位定義為P1.5引腳 sbit P16=P1^6; //將P16位定義為P1.6引腳 sbit P17=P1^7; //將P17位定義為P1.7引腳 unsigned char keyval; //定義變量儲存按鍵值 sbit sound=P2^0; //將sound定義為P2.0 unsigned int C; //全局變量,儲存定時器的定時常數 unsigned int f; //全局變量,儲存音階的頻率 //以下是C調低音的音頻宏定義 #define l_dao 262 //將“l_dao”宏定義為低音“1”的頻率262Hz #define l_re 294 //將“l_re” 宏定義為低音“2”的頻率294Hz #define l_mi 330 //將“l_mi” 宏定義為低音“3”的頻率330Hz #define l_fa 349 //將“l_fa” 宏定義為低音“4”的頻率349Hz #define l_sao 392 //將“l_sao”宏定義為低音“5”的頻率392Hz #define l_la 440 //將“l_la” 宏定義為低音“6”的頻率440Hz #define l_xi 494 //將“l_xi” 宏定義為低音“7”的頻率494Hz //以下是C調中音的音頻宏定義 #define dao 523 //將“dao”宏定義為低音“1”的頻率Hz #define re 587 //將“re” 宏定義為低音“2”的頻率Hz #define mi 659 //將“mi” 宏定義為低音“3”的頻率Hz #define fa 698 //將“fa” 宏定義為低音“4”的頻率Hz #define sao 784 //將“sao”宏定義為低音“5”的頻率Hz #define la 880 //將“la” 宏定義為低音“6”的頻率Hz #define xi 988 //將“xi” 宏定義為低音“7”的頻率Hz
上傳時間: 2013-11-09
上傳用戶:tian126vip
prolog 找路例子程序: === === === === === === Part 1-Adding connections Part 2-Simple Path example | ?- path1(a,b,P,T). will produce the response: T = 15 P = [a,b] ? Part 3 - Non-repeating path As an example, the query: ?- path2(a,h,P,T). will succeed and may produce the bindings: P = [a,depot,b,d,e,f,h] T = 155 Part 4 - Generating a path below a cost threshold As an example, the query: ?- path_below_cost(a,[a,b,c,d,e,f,g,h],RS,300). returns: RS = [a,b,depot,c,d,e,g,f,h] ? RS = [a,c,depot,b,d,e,g,f,h] ? no ==================================
標簽: Part connections example prolog
上傳時間: 2015-04-24
上傳用戶:ljt101007
Random Number Generators(隨機數生成)包括gaussian random number generator、uniform random number generator、low-frequency hold generator、1/f noise generator等5種隨機信號生成的c源代碼
標簽: generator random number Generators
上傳時間: 2014-12-07
上傳用戶:edisonfather
高精度乘法基本思想和加法一樣。其基本流程如下: ①讀入被乘數s1,乘數s2 ②把s1、s2分成4位一段,轉成數值存在數組a,b中;記下a,b的長度k1,k2; ③i賦為b中的最低位; ④從b中取出第i位與a相乘,累加到另一數組c中;(注意:累加時錯開的位數應是多少位 ?) ⑤i:=i-1;檢測i值:小于k2則轉⑥,否則轉④ ⑥打印結果
上傳時間: 2015-08-16
上傳用戶:源弋弋
ACM試題An Easy Problem Description As we known, data stored in the computers is in binary form. The problem we discuss now is about the positive integers and its binary form. Given a positive integer I, you task is to find out an integer J, which is the minimum integer greater than I, and the number of 1 s in whose binary form is the same as that in the binary form of I. For example, if "78" is given, we can write out its binary form, "1001110". This binary form has 4 1 s. The minimum integer, which is greater than "1001110" and also contains 4 1 s, is "1010011", i.e. "83", so you should output "83".
標簽: Description computers Problem binary
上傳時間: 2013-12-11
上傳用戶:libenshu01
μC/OS-II Goals Probably the most important goal of μC/OS-II was to make it backward compatible with μC/OS (at least from an application’s standpoint). A μC/OS port might need to be modified to work with μC/OS-II but at least, the application code should require only minor changes (if any). Also, because μC/OS-II is based on the same core as μC/OS, it is just as reliable. I added conditional compilation to allow you to further reduce the amount of RAM (i.e. data space) needed by μC/OS-II. This is especially useful when you have resource limited products. I also added the feature described in the previous section and cleaned up the code. Where the book is concerned, I wanted to clarify some of the concepts described in the first edition and provide additional explanations about how μC/OS-II works. I had numerous requests about doing a chapter on how to port μC/OS and thus, such a chapter has been included in this book for μC/OS-II.
標簽: OS-II compatible important Probably
上傳時間: 2013-12-02
上傳用戶:jkhjkh1982
Intro/: Directory containing introductory examples. HelloWorld.c A simple program that draws a box and writes "Hello World" in HelloWorld.f it. data The data file for the introductory progressive example. Lines.c Reads the data from file "data" and plots just the curve with Lines.f no labels, viewport or anything indicating quantity or units. Viewport.c Restricts the graph to a viewport and frames the viewport, Viewport.f leaving the remainder of the area for labels, etc. CharLbls.c Adds labels for the chart title, X-axis title, and Y-axis CharLbls.f title. Tics.c Adds tic marks to the viewport edges, but since clipping was Tics.f not set correctly, tics extend outside the viewport. Clip.c Sets clipping such that tic marks are clipped at the viewport Clip.f boundaries. TicLabels.c Adds numeric tic labels to the graph this is the final TicLabels.f installment of the progressive example.
標簽: introductory HelloWorld containing Directory
上傳時間: 2016-03-29
上傳用戶:exxxds
一、問題的提出: 某廠根據計劃安排,擬將n臺相同的設備分配給m個車間,各車間獲得這種設備后,可以為國家提供盈利Ci j(i臺設備提供給j號車間將得到的利潤,1≤i≤n,1≤j≤m) 。問如何分配,才使國家得到最大的盈利L 二.算法的基本思想: 利用動態規劃算法的思想,設將i臺設備分配給j-1個車間,可以為國家得到最大利潤Li (j-1)(1≤i≤n,1≤j≤m),那么將這i臺設備分配給j個車間,第j個車間只能被分配到0~i臺,所以我們只要算出當第j個車間分配到t(0<=t<=i)臺時提供的最大利潤Lt(j-1)+C(i-t)j,
標簽:
上傳時間: 2016-09-19
上傳用戶:希醬大魔王