matlab

Comparing Naive Inverse Filter to Wiener Filter for Deconvolution in Matlab

廉价感情. 提交于 2021-02-20 19:34:04
问题 I am currently trying to compare a simple inverse filter to the wiener filter for deconvolution using matlab. My starting signal is exp(-t^2) and this is to be convolved with a rect that is nonzero for times -.5 to .5. I am introducing noise with amplitude in the range -.5 to .5. Defining my time domain to frequency domain mapping: f = exp(-t^2) => F s = rect => R c = f*s => C r = noise (see above) => R with noise c becomes: c = f*s + n => C = FxS + N For the first approach I am simply taking

形态学膨胀腐蚀

╄→гoц情女王★ 提交于 2021-02-20 13:55:14
% 放大图像以放大形状 % 使用imdilate函数来扩展图像 % 形态扩展操作扩展或加厚图像中的前景对象 BW = zeros(9,10); BW(4:6,4:7) = 1; imshow(imresize(BW,40,'nearest')) % 创建一个结构元素与imdilate一起使用 % 要展开几何对象,通常需要创建与对象形状相同的结构元素 SE = strel('square',3); % 将输入图像和结构元素传递给imdilate % 向前景对象的所有边添加1 BW2 = imdilate(BW,SE); imshow(imresize(BW2,40,'nearest')) % 为了进行比较,创建一个不同形状的结构元素 % 使用新的结构元素扩展原始图像 SE2 = strel('diamond',1); BW3 = imdilate(BW,SE2); imshow(imresize(BW3,40,'nearest')) montage({BW,BW2,BW3}, 'Size', [3 1]); %% 腐蚀图像以去除细线条 % 使用imerode函数来腐蚀二进制图像 % 图像读取、显示图像 BW1 = imread('circbw.tif'); imshow(BW1) % 创建一个对角结构元素 SE = strel('arbitrary',eye(7)); % 腐蚀图像

完成你的第一个智能无人机

喜欢而已 提交于 2021-02-20 11:46:44
前 言 对于大多数无人机爱好者来说,能自己从头开始组装一台无人机,之后加入AI算法,能够航拍,可以目标跟踪,是心中的梦想。并且,亲自从零开始完成复杂系统,这是掌握核心技术的必经之路。 基于此,开课吧特邀北京航空航天大学无人机专家,进行设计和指导,独家研发与真实的科学研究和工程开发接轨的课程。软硬件结合,将教你亲自研发无人机,而不是简单的购买一个无人机整机。 课程由北京航空航天大学无人机专家设计和指导,与真实的科学研究和工程开发接轨。有以下六大优势: 那么,直接购买无人机和我们的课程研发无人机的区别在哪里呢?请看下图: 我们的课程并不是简单的拼装课程,更涉及到 飞行器设计、仿真平台搭建和算法实现的整体流程。 我们课程将会 教你无人机的基本组成、飞行原理、控制理论、状态估计、同时定位与建图、运动规划、目标检测追踪与多无人机协同; 从元器件开始搭建一个具有GPS导航和人为规划路线功能的无人机,并搭建无人机仿真平台,在仿真平台上实现各类智能算法的开发与部署。 本课程分为两大板块: ❥ 课程大纲 (仿真环境下无人机SLAM) ( 真实环境下无人机VIO ) (仿真环境下的运动规划) (仿真环境下的多机协同) (仿真环境下的无人机追踪行人) (真实环境下,无人机追踪亮灯) 本课程适合以下人员的学习: 注意: 如果学员是未成年人,家长请做好保护措施和安全教育; 组装飞行无人机有一定的安全隐患

MATLAB绘图

孤街浪徒 提交于 2021-02-20 02:57:05
一、直角坐标系中的连续函数 1.简单绘图 >>x=[0:0.1:5]; >>y=sin(x); >>plot(x,y),xlabel('x')/*横坐标*/,ylabel('y')/**纵坐标/; 2.更精确的图 fplot('exp(-1.2*x).*sin(x)',[0,4])/*在(0,4)上绘制图像*//*这里必须是点乘(矩阵相乘),直接*会报错*/,title('y=exp(-1.2x)*sin(x)的图像') 3.更多绘图选项 plot(x,y),grid on/*绘制网格*/,axis equal/*间距相同*/ /*axis auto是让MATLAB自动选择*/ 4.同时绘制多个函数 plot(x,y,t,f,'--')/*用默认实线绘制y=f(x),用'--'绘制f=f(t)*/ /*还有实线‘-’,虚线‘--’,虚点线‘-.’,点线‘:’*/ 还可以在图像旁添加图例用‘legend‘,即plot(x,yt,f,'--'),legend('sinh(x)','cosh(x)'),如下图: 5.个性化设置 (1)颜色 plot(x,y,'r--') /*用红色虚线绘制图像*/ (2)坐标比例 plot(x,y),axis([xmin xmax ymin ymax]) (3)一次显示两个坐标系 subplot(1,2,1) /*一行两列,当前函数在这行第一个*/ /

Matlab real time audio processing

最后都变了- 提交于 2021-02-19 16:22:18
问题 I'm trying to record my microphone input and process it at the same time. I tried with a loop with this inside: recordblocking(recorder, 1); y = getaudiodata(recorder); % any processing on y But while I'm doing something with y , I'm losing information since not recording continuously. Is there something I could do to continuously record sound coming in my microphone, store it in some kind of buffer, and process chunks of it at the same time? A delay isn't a problem, but I really need the

Matlab real time audio processing

三世轮回 提交于 2021-02-19 16:21:54
问题 I'm trying to record my microphone input and process it at the same time. I tried with a loop with this inside: recordblocking(recorder, 1); y = getaudiodata(recorder); % any processing on y But while I'm doing something with y , I'm losing information since not recording continuously. Is there something I could do to continuously record sound coming in my microphone, store it in some kind of buffer, and process chunks of it at the same time? A delay isn't a problem, but I really need the

Matlab real time audio processing

£可爱£侵袭症+ 提交于 2021-02-19 16:21:11
问题 I'm trying to record my microphone input and process it at the same time. I tried with a loop with this inside: recordblocking(recorder, 1); y = getaudiodata(recorder); % any processing on y But while I'm doing something with y , I'm losing information since not recording continuously. Is there something I could do to continuously record sound coming in my microphone, store it in some kind of buffer, and process chunks of it at the same time? A delay isn't a problem, but I really need the

How to desig MLP neural network in Matlab?

杀马特。学长 韩版系。学妹 提交于 2021-02-19 08:22:11
问题 Hi I've design the XOR with a three layered Neural Network. Now I have a new problem similar to xor but still I can't figure out how to solve it . Here's the problem : I want to distinguish the red area from blue area.As you can I have an area of -1 to 1 vertically and -1 to 1 horizontally. can any body give me a clue? or some sort of sample code or network configuration in matlab? 回答1: I had a similar task when I was learning about the ANN concept, I will share the code with you that

Matlab split into train/valid/test set and keep proportion

♀尐吖头ヾ 提交于 2021-02-19 08:17:47
问题 I have dataset with 12 columns + 1 target (binary) and about 4000 rows. I need to split it into train (70%), validation (20%) and test (10%) set. The dataset is quite undersampled (95% of class 0 to 5% of class 1) so I need to keep the ratio of target in each sample. I am able to split the dataset somehow, but I have no idea how to keep the ratio. I am working with subset Wine Quality data here 回答1: If you have access to Matlab's Statistical processing toolbox you can used the cvpartition

关于matlab解析json的笔记

烈酒焚心 提交于 2021-02-19 08:13:17
Matlab访问RESTful接口 MATLAB ® RESTful Web 服务函数 webread 、 websave 、 webwrite 和 weboptions 允许非编程人员使用 HTTP GET 和 POST 方法访问多个 Web 服务。 在我们的场景里只要用webread函数就可以了,webread函数从制定的web服务中读取url并返回页面内容data data = webread( ' https://www.npclo.com/api/modeling?oid=5a37186c0246a33384333cba ' ); Matlab解析Json matlab本身没有解析json数据的函数,在matalb官网论坛上可以找到两个解析json的第三方库(函数):json4mat和parse_json。 根据网上资料显示两个函数均可实现json解析,但json4mat速度更快,所以我优先尝试了json4mat,但是出现数组越界的报错。经确认,页面上返回的数据符合json格式,反复debug也没有找到原因所在,选择放弃。 然后我尝试了parse_json函数,一次成功,没有报错。但是得到的数据是struct数据,只能用鼠标点开,不知道如何自动读取具体数据。 cell和struct的转换 参考: https://blog.csdn.net/kyang624823