A=data(:,2)R1=data(:,5)TA=A' % Transpose the Input and Output data from column to row matrix
TR1=R1'[NA,PS]=mapminmax(TA) %Normalize the transposed input and output data
[NR1,TS]=mapminmax(TR1)for i=1:20;net = feedforwardnet(i,'trainlm');net.trainParam.show = 50;net.trainParam.lr = 0.05;net.trainParam.epochs = 300;net.trainParam.goal = 1e-5;[net,tr] = train(net,NA,NR1);[trainInd,valInd,testInd] = dividerand(20,0.7,0.15,0.15); %Divide data randomly
Y=sim(net,NA)TY=mapminmax('reverse',Y,TS); %Denormalize simulated data
plot(i,TR1,'red',i,TY,'blue') % Plot comparison graph of experimental output data and simulated data
title('Graph of Comparison between Experimental Output Data and Simulated Data')xlabel('Experimental Input Data')ylabel('Experimental Output Data and Simulated Data')legend('Experimental Output Data','Simulated Data')end
MATLAB: Hi, I am working on a set of code implying the ANN. My end purpose is to plot a comparison graph between actual output and simulated output. However, there isn’t any points displayed in the plot. What is the correct syntax
artificial neural networkplot
Related Question
- Normalize Inputs and Targets of neural network
- How to use two separate files for ANN
- How can i evaluate the network performance as i have trained the model
- How to improve ANN results by reducing error through hidden layer size, through MSE, or by using while loop
- Regularization in Neural Networks, help needed
Best Answer