Bonjour
Je cherche à visualiser graphiquement le résultat d'une classification avec QDA.
Pour ce faire, j'ai utilisé les lignes de code données dans le help de matlab:
Mais ceci ne marche pas et me génère des erreurs et des warnings que je cite:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 K = coeff(1,2).const; L = coeff(1,2).linear; Q = coeff(1,2).quadratic; f= @(x,y) K + [x y]*L + sum(([x y]*Q) .* [x y], 2); hold on h2 = ezplot(f, [min(m(:,1)) max(m(:,1)) min(m(:,1)) max(m(:,1))]);
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 Warning: Function failed to evaluate on array inputs; vectorizing the function may speed up its evaluation and avoid the need to loop over array elements. > In specgraph\private\ezplotfeval at 57 In ezplot>ezimplicit at 253 In ezplot at 153 ??? In an assignment A(I) = B, the number of elements in B and I must be the same. Error in ==> ezplotfeval>applyfun at 83 z(i) = feval(f,x(i),y(i)); Error in ==> ezplotfeval at 68 z = applyfun(x,y); Error in ==> ezplot>ezimplicit at 253 u = ezplotfeval(f,X,Y); Error in ==> ezplot at 153 hp = ezimplicit(cax,f{1},vars,labels,args{:});
Quelqu'un pourrait m'aider?
Merci
Partager