E
E
Evgeny Petryaev2021-12-16 16:48:29
Algorithms
Evgeny Petryaev, 2021-12-16 16:48:29

How to submit an array in matlab?

There is a 3-dimensional array sg with dimensions 51x1000x12

net=train(net,sg(jj,:,:),[1 1 1 1 1 1 1 1 1 1 1 1 ; 0 0 0 0 0 0 0 0 0 0 0 0 ]);

With this code I want to feed a two-dimensional array of 1000x12 to the network, it does not work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Petryaev, 2021-12-17
@Gremlin92

Decided so

for jj=1:1:51
        for jjj=1:1000
        for k=1:12
            sg(jjj,k) = signal(jj,jjj,k);
            sgu(jjj,k) = signalun(jj,jjj,k);
        end
        end
        net.trainParam.epochs = 1;
        net=train(net,sg,[1 1 1 1 1 1 1 1 1 1 1 1 ;0 0 0 0 0 0 0 0 0 0 0 0]);
        net=train(net,sgu,[0 0 0 0 0 0 0 0 0 0 0 0;1 1 1 1 1 1 1 1 1 1 1 1]); 
    end

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question