While trying to import data to neural network fitting and after selecting predictors when browsing data fore response Matlab automatically changes data in predictor then error
조회 수: 11 (최근 30일)
이전 댓글 표시
답변 (1개)
Yash
2023년 7월 18일
Hello Mohammad,
The issue you are experiencing is due to the Import Wizard that converts the table from the input file into a matrix, named "data". This variable "data" is then overwritten when you try to load the next input file, as the variable created is always named "data".
The following steps can help resolve the issue.
- Open the Neural Net Fitting App and click on the "Import" icon.
- This opens the Import Data from Workspace window. Click on the "Browse" button next to the "Predictors:" field and select the Predictors input file.
- This opens a new window named Import Wizard, where the preview of the matrix that has been converted from the table in the input file is displayed on the right. Click the "Next >" button.
- The next page displays the variables that will be loaded into the MATLAB workspace. Right-click on the "data" variable under the "Name" column and select "Rename Variable". Then rename the variable to an appropriate variable name, such as "predictorsData".
- At this point you can also deselect the "colheaders" and "textdata" variables from being loaded into the MATLAB workspace, if they are unnecessary. Then click "Finish".
- Repeat steps 2 - 3 for the "Responses:" field with the Responses input file.
- Repeat step 4 but rename the "data" variable to "responsesData".
- Repeat step 5.
- Then when the "OK" button is pressed in the Import Data from Workspace window, the error will no longer occur.
I hope this helps.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!