线性逼近 clear;clc;close all x = [1,0.5; 1.5,1.1; 3,3; -1.2,-1]; y = x(:,2); x = [ones(size(x,1),1),x(:,1)]; w0 = [0.2;1]; ita = 0.1; tol = 0.608; % ??人为设定的-- err = inf; k = 0; while err > tol & k<20 k = k+1; i = mod(k,4)+1; w = w0+ita*(y(i,:)-x(i,:…
[Unity3D]做个小Demo学习Input.touches 学不如做,下面用一个简单的Demo展示的Input.touches各项字段,有图有真相. 本项目已发布到Github,地址在(https://github.com/bitzhuwei/AndroidTouchDemo). 制作Demo 很简单,只需拉一个Text,然后添加一个脚本. 脚本如下. using UnityEngine; using System.Collections; public class DisplayTouch…