Jacket for Matlab 1.8新增功能介绍

新函数: 

基本工具二进制到十进制转换BI2DEDE2BI

核心MEDIANPROD

图像处理IMRESIZEIM2DOUBLEMAT2GRAYBWLABELHISTEQIMNOISE

统计NORMINVNORMCDF

信号处理FIR2RESAMPLEBUTTERBILINEAR

·

         改善

SUBSASGN部分支持NULL分配. A(idx) = []; 支持离散, sorted idx.

CUMSUM和 CUMPROD 支持GFOR 沿着所有维度.

CUMSUMCUMPROD 列更快 < 1e6 elements元素.

CONVCONV2和 CONVN 支持复杂内核.

o (SUMPRODANYALLMINMAX更快.

IMERODEIMDILATEBWMORPHHISTIMFILTER支持 GFOR 

HISTGPU1.2+以上运行速度更快

MTIMESA * B(:,:,ii) 支持GFOR 其中稀疏, B稠密.

SORT降序和索引 SORT 矢量输入速度更快.

延长LINSOLVE 支持包括GFOR 支持.

MLDIVIDE正定,三角输入速度更快

EIGsymmetric / hermitian 输入更快.

· 例子: 

更新,CPUGPU使用相同代码 (see "Write once, run everywhere")

新例子分割颅骨扫描基因组学的多维尺度

当前的例子的完整描述Examples

·

      API 改变

SUMPRODMINMAXANYALL 现在回到GPU的标量,而不是CPU的标量向量输入。

图形

PLOTPLOT3 现在支持linestyle string参数设置颜色

使用缩放和平移轴纠正

增加GCOLORMAPGTITLEGDRAWNOW

改进 Windows 性能

· DISPLAYDISP 查看每个内容GFOR 而不只是第一个

· 稀疏矩阵支持 BICGSTAB支持旧版本 MATLAB

· SUBSASGN5倍更快A(boolean_mask)=scalar

· GDOUBLE下标转换 GSINGLE并警告而不是抛出错误

· 在许多情况下不再需要标前预分配


实例:

% v1.7

A = gones(n,n);

gfor ii = 1:n

  A(ii,:) = gones(1,n);

gend

 

% v1.8 (no need to preallocate A)

gfor ii = 1:n

  A(ii,:) = gones(1,n);

Gend 

转载于:https://www.cnblogs.com/gpus/archive/2011/10/13/2209957.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,下面是一个简单的 C 语言字典功能的实现示例: ```c #include <stdio.h> #include <string.h> // 定义一个结构体,表示字典中的一个词条 struct Entry { char word[20]; char definition[100]; }; // 定义一个函数,用于在字典中查找给定的单词 void lookup(struct Entry dictionary[], char searchWord[]) { int i; for (i = 0; i < 10; i++) { if (strcmp(searchWord, dictionary[i].word) == 0) { printf("%s\n", dictionary[i].definition); return; } } printf("Sorry, the word is not in the dictionary.\n"); } int main() { // 定义一个字典,包含 10 个词条 struct Entry dictionary[10] = { {"apple", "a round fruit with red, yellow, or green skin and firm white flesh"}, {"banana", "a long curved fruit which grows in clusters and has soft pulpy flesh and yellow skin when ripe"}, {"cat", "a small domesticated carnivorous mammal with soft fur, a short snout, and retractable claws"}, {"dog", "a domesticated carnivorous mammal with a barking voice and a short coat"}, {"elephant", "a very large animal with a long nose called a trunk, used for grasping objects, and two long curved ivory tusks"}, {"fish", "a cold-blooded aquatic vertebrate with scales and gills"}, {"grape", "a small sweet or sour fruit with a thin skin and small seeds"}, {"horse", "a large four-legged animal with a mane and tail"}, {"ice cream", "a cold sweet food made from frozen milk or cream"}, {"jacket", "an outer garment worn by both men and women, typically having sleeves and a fastening down the front"} }; // 从用户输入中读取要查找的单词,然后在字典中查找 char searchWord[20]; printf("Please enter a word to look up: "); scanf("%s", searchWord); lookup(dictionary, searchWord); return 0; } ``` 在这个例子中,我们定义了一个结构体 `Entry`,表示字典中的一个词条,包含一个单词和一个定义。然后我们定义了一个函数 `lookup`,接受一个字典数组和一个要查找的单词,用于在字典中查找给定的单词。在 `lookup` 函数中,我们使用了 `strcmp` 函数来比较两个字符串是否相等。最后,在 `main` 函数中,我们定义了一个包含 10 个词条的字典数组 `dictionary`,并从用户输入中读取要查找的单词,然后调用 `lookup` 函数在字典中查找。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值