自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

孤月天心

无限野云风卷尽,一轮孤月照天心

  • 博客(17)
  • 收藏
  • 关注

原创 SAS学习(五)

SAS可以将其他格式的文件导入进行数据分析,但是SAS变量名不支持中文,所以其他文件如变量中有中文名会导入失败,即使导入成功也无法使用。切记!

2014-02-27 22:40:02 706

原创 SAS学习(四)

两组数据的秩和检验data example410; input group ki67; cards;1 0.140 1 0.116 1 0.162 1 0.144 1 0.406 1 0.152 1 0.154 1 0.176 1 0.136 1 0.248 1 0.216 1 0.104 1 0.310 1 0.252 1 0.132 1 0.

2014-02-27 22:37:37 798

原创 SAS学习(三)

/* 随机区组设计 */proc plan;factors block =23 ordered rank =3 random;run;

2014-02-27 09:16:25 867

原创 SAS学习(二)

/* 研究对象随机分组 */proc plan seed =091015; /* proc plan必有,seed参数可选,默认以及其时间为种子 */factors rand =384 random; /* factors为关键字不可省略,rand为变量名可以任取。384表示抽样例数*/output out =outA; /* 将随机结果输出值数据集outa */d

2014-02-27 09:14:33 1718

原创 SAS学习(一)

/* 该程序为两组均数比较的参数估计 */proc power;/* 以下为参数,结尾不能加分号,切记。课写在一行中间用一个值数个分号隔开 */twosamplemeans /* 该参数表示两组均数比较 */groupmeans =8.06|7.23 /* 两组均数分别为8.06 7.23 */stddev =1.68 /* 标准差为1.68 */power =0.8

2014-02-27 09:12:21 1665

原创 fprintf测试

#include #include int main(int argc, char **argv){ FILE *file1; char *s ="hello world!"; file2 =fopen("2.txt", "w"); fprintf(file2, "%s", s);}

2014-02-22 11:04:03 855

原创 BMP图像加载实例(C语言)

bmp图像常被称为位图,这实际是对位图的误解,具体可见opengl superbible中对图像的说明。代码如下:#include #include #include #ifdef _APPLE_#include #else#define FREEGLUT_STATIC#include #endifGLuint loadBMP_custom(const char *

2014-02-22 03:11:06 1617

原创 glsl glDrawElements实例(C语言)

depth.vert;#version 330layout(location =0) in vec3 vertexPosition;layout(location =1) in vec4 vertexColor;smooth out vec4 theColor;uniform vec3 offset;uniform mat4 perspectiveMatrix;void m

2014-02-20 16:40:03 1812

原创 GLSL透视矩阵(C语言)

perspective.vert#version 330layout(location =0) in vec4 vertexPosition;layout(location =1) in vec4 vertexColor;smooth out vec4 theColor;uniform vec2 offset;uniform mat4 perspectiveMatrix;v

2014-02-16 18:27:03 1310

原创 GLSL 透视变换(着色器实现C语言)

shaderperspective.vert#version 330layout(location =0) in vec4 vertexPosition;layout(location =1) in vec4 vertexColor;smooth out vec4 vColor;uniform vec2 offset;uniform float zNear;uniform

2014-02-15 15:54:44 1392

原创 GLSL变换颜色的三角形(C语言)

////////////////////////////////////////////////////////////////////////////////////////移动三角形 颜色变换//作者:青丝成霜//////////////////////////////////////////////////////////////////////////////////////#in

2014-02-13 16:42:46 1287

原创 glsl移动的三角形

////////////////////////////////////////////////////////////////////////////////////////移动三角形,版本2:通过shader实现位置变化.//作者:青丝成霜///////////////////////////////////////////////////////////////////////////

2014-02-13 13:09:58 1106

原创 3D数学库的简单实现(C语言)

头文件vmath.h#ifndef _VMATH_H#define _VMATH_H#ifdef _cplusplusextern "C" {#endiftypedef float Matrix44f[16];void translate(Matrix44f M, float x, float y, float z);void scale(Matrix44f M,

2014-02-13 12:50:36 2144

原创 C语言函数返回值不能直接写数组

C语言返回值不能直接写数组#ifndef _VMATH_H#define _VMATH_H#ifdef _cplusplusextern "C" {#endiftypedef float Matrix44f[16];Matrix44f translate(float x, float y, float z);Matrix44f scale(float x, float

2014-02-12 14:48:40 2745

转载 C语言调用C++函数

前阵子被问及一个在C中如何调用C++函数的问题,当时简单回答是将函数用extern "C"声明,当被问及如何将类内成员函数声明时,一时语塞,后来网上查了下,网上有一翻译C++之父的文章可以作为解答,遂拿来Mark一下。 将 C++ 函数声明为``extern "C"''(在你的 C++ 代码里做这个声明),然后调用它(在你的 C 或者 C++ 代码里调用)。例如:// C++ code

2014-02-12 12:30:49 3849

原创 glsl着色器(c语言)

#include #include #include #include "readtext.h"#ifdef __APPLE__#include #else#define FREEGLUT_STATIC#include #endif#pragma comment(lib,"../readtext.lib")#pragma comment(lib,"../glew3

2014-02-12 11:28:25 1777

转载 齐次坐标的理解

原文再此:http://www.cnblogs.com/csyisong/archive/2008/12/09/1351372.html一直对齐次坐标这个概念的理解不够彻底,只见大部分的书中说道“齐次坐标在仿射变换中非常的方便”,然后就没有了后文,今天在一个叫做“三百年 重生”的博客上看到一篇关于透视投影变换的探讨的文章,其中有对齐次坐标有非常精辟的说明,特别是针对这样一句话进行了有力的证明:

2014-02-11 20:33:51 750

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除