Matlab错误:表达式不是赋值的有效目标

时间:2015-02-12 02:29:21

标签: matlab

这是数据集

7

4

(3,7)

(1,5)

(1,5)

(4,3)

(4,4)

(4,5)

(1,6)

counter =1;             %Keeps track of number of the present number of hubs
continue = 1;   % 1=true 0=false indicates whether to continue forming new
            %hubs

    while continue
    counter = counter + 1;    % adding new hub
    [m,i]=max(dist);        %m= maximum value in the distance array
                           %i is the location of the maximum value in the

Trying to implement this algorithm

Here is the my Full code

error

Error: File: kmeans.m Line: 14 Column: 10
The expression to the left of the equals sign is not a valid target for an     assignment.

1 个答案:

答案 0 :(得分:1)

continue是一个关键字,您不能将其用作变量的名称。

这实际上是非常明显的,因为当您在ideone上粘贴代码时,您选择了正确的语言(八度),并且它为MATLAB和Octave代码正确地进行了语法着色。