如何在Matlab中找到与给定向量最接近的向量? [英] how to find the closest vector to a given vector in matlab?

查看:276
本文介绍了如何在Matlab中找到与给定向量最接近的向量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在matlab中有一组n维代表向量.我必须根据接近度将向量从一组训练向量到代表向量代表的组进行分组.我该怎么办?

I have a set of n-dimensional representative vectors in matlab. I have to group vectors from a set of training vectors to groups represented by representative vectors based on proximity. How should I do it?

推荐答案

您可以使用 dsearchn 以查找最接近每个点的代表.我建议您先尝试不涉及三角剖分矩阵的版本.如果内存或CPU性能不够好,请研究三角剖分.

You can use dsearchn to find which representative is closest to each point. I would recommend trying the version that doesn't involve a triangulation matrix first. If the memory or CPU performance isn't good enough, look into the triangulation stuff.

这篇关于如何在Matlab中找到与给定向量最接近的向量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆