无法弄清楚如何确定矩阵的大小

时间:2019-03-05 06:53:24

标签: matlab

这是我尝试的:

wave=2+2*cos(linspace(-pi,pi,5000));%This is the basic sin curve scaled up with 1500 data points

TuningCurves(1:CellCount,1:10000)=0;%Initialize firing rate to Nans

centerPoints=round(linspace(1001,9001,CellCount));

我收到此错误:

Unable to perform assignment because the size of the left side is 1-by-2000 and the size of the right side is 1-by-5000.

Error in assignment5 (line 278)
    TuningCurves(n,centerPoints(n)-1000:centerPoints(n)+999)=wave;

最初wave=2+2*cos(linspace(-pi,pi,2000));是2000点,所以我尝试将其修改为5000。如何解决这个问题? CellCount是8。

0 个答案:

没有答案