有大神帮忙看看吗?

网上找的代码,在我的电脑下运行,总是出错,出错位置如下:

>> [py,mse] = svmpredict(Y_test,X_test,model);
Mean squared error = 0.0879962 (regression)
Squared correlation coefficient = 0.645314 (regression)

报错提示如下:

------------------------------------------------------------------------
          Access violation detected at Fri Feb 07 13:22:55 2020
------------------------------------------------------------------------

Configuration:
  Crash Decoding      : Disabled - No sandbox or build area path
  Crash Mode          : continue (default)
  Current Graphics Driver: ATI Technologies Inc. Radeon(TM) RX 460 Graphics Version 4.5.13464 Compatibility Profile Context 21.19.409.256
  Default Encoding    : GBK
  Deployed            : false
  Graphics card 1     : Advanced Micro Devices, Inc. ( 0x1002 ) Radeon(TM) RX 460 Graphics Version 21.19.409.256
  Graphics card 2     : Advanced Micro Devices, Inc. ( 0x1002 ) AMD Radeon R5 Graphics Version 21.19.409.256
  Host Name           : DESKTOP-E6HVKN9
  MATLAB Architecture : win64
  MATLAB Entitlement ID: Unknown
  MATLAB Root         : D:\Program Files\MATLAB\R2016b
  MATLAB Version      : 9.1.0.441655 (R2016b)
  OpenGL              : hardware
  Operating System    : Microsoft Windows 10 专业版
  Processor ID        : x86 Family 111 Model 101 Stepping 1, AuthenticAMD
  Virtual Machine     : Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  Window System       : Version 10.0 (Build 14393)

Fault Count: 1

Abnormal termination:
Access violation

Register State (from fault):
  RAX = 0000000000000038  RBX = 0000000000000031
  RCX = 0000000000000000  RDX = 00000001003c4280
  RSP = 00000000043f8ab8  RBP = 0000000000000031
  RSI = 0000000107d58cd0  RDI = 0000000000000031
 
   R8 = 0000000000000000   R9 = 0000000000008000
  R10 = 0000000000000000  R11 = 00000000043f8a60
  R12 = 00000000043fc320  R13 = 0000000000000002
  R14 = 000000008cb40b30  R15 = 000000000f72f828
 
  RIP = 000000018008a5c8  EFL = 00010206
 
   CS = 0033   FS = 0053   GS = 002b

Stack Trace (from fault):
[  0] 0x000000018008a5c8 D:\Program Files\MATLAB\R2016b\bin\win64\libmx.dll+00566728 mxGetPr+00000000
[  1] 0x00007ff823c51a00 E:\论文_张莉\02_基于无人机多光谱遥感的大豆叶面积指数反演研究\01_test_svm\libsvm-new\svmpredict.mexw64+00006656
[  2] 0x00007ff823c51cff E:\论文_张莉\02_基于无人机多光谱遥感的大豆叶面积指数反演研究\01_test_svm\libsvm-new\svmpredict.mexw64+00007423 mexFunction+00000543
[  3] 0x00000000fc5fc5d1 D:\Program Files\MATLAB\R2016b\bin\win64\libmex.dll+00116177 mexRunMexFile+00000129
[  4] 0x00000000fc5fb2e2 D:\Program Files\MATLAB\R2016b\bin\win64\libmex.dll+00111330 mexFeature_mexver+00001794
[  5] 0x00000000fc5fa506 D:\Program Files\MATLAB\R2016b\bin\win64\libmex.dll+00107782 mexUnlock+00020182
[  6] 0x00000000163846de D:\Program Files\MATLAB\R2016b\bin\win64\m_dispatcher.dll+00018142 Mfh_file::dispatch_fh_impl+00000434
[  7] 0x00000000163844b6 D:\Program Files\MATLAB\R2016b\bin\win64\m_dispatcher.dll+00017590 Mfh_file::dispatch_fh+00000062
[  8] 0x0000000016385827 D:\Program Files\MATLAB\R2016b\bin\win64\m_dispatcher.dll+00022567 Mfunction_handle::dispatch+00001015
[  9] 0x0000000016648c29 D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00887849 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00798773
[ 10] 0x000000001665728f D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00946831 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00857755
[ 11] 0x0000000016657b75 D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00949109 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00860033
[ 12] 0x0000000016659151 D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00954705 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00865629
[ 13] 0x0000000016659c95 D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00957589 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00868513
[ 14] 0x000000001665932f D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00955183 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00866107
[ 15] 0x000000001665940d D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00955405 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00866329
[ 16] 0x0000000016648041 D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00884801 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00795725
[ 17] 0x00000000165c9eab D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00368299 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00279223
[ 18] 0x00000000165c9740 D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00366400 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00277324
[ 19] 0x00000000165c3f8f D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00343951 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00254875
[ 20] 0x00000000165c3aa1 D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00342689 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00253613
[ 21] 0x00000000165c3991 D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00342417 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00253341
[ 22] 0x00000000167503e9 D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+01967081 boost::serialization::singleton<boost::archive::detail::oserializer<boost::archive::polymorphic_oarchive,foundation::msg_svc::eventmgr::BaseEvent> >::get_instance+00003353
[ 23] 0x0000000016750372 D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+01966962 boost::serialization::singleton<boost::archive::detail::oserializer<boost::archive::polymorphic_oarchive,foundation::msg_svc::eventmgr::BaseEvent> >::get_instance+00003234
[ 24] 0x0000000016612a61 D:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00666209 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00577133
[ 25] 0x000000001846b3bd D:\Program Files\MATLAB\R2016b\bin\win64\m_interpreter.dll+00504765 inEvalCmdWithLocalReturn+00000065
[ 26] 0x00000000fb608ced D:\Program Files\MATLAB\R2016b\bin\win64\libmwbridge.dll+00101613 mnGetPrompt+00012957
[ 27] 0x00000000fb609ba3 D:\Program Files\MATLAB\R2016b\bin\win64\libmwbridge.dll+00105379 mnParser+00001091
[ 28] 0x0000000015ad6841   D:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00223297 mcr::runtime::setInterpreterThreadToCurrent+00025585
[ 29] 0x0000000015ad57d7   D:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00219095 mcr::runtime::setInterpreterThreadToCurrent+00021383
[ 30] 0x0000000015ad5853   D:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00219219 mcr::runtime::setInterpreterThreadToCurrent+00021507
[ 31] 0x0000000015ad6141   D:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00221505 mcr::runtime::setInterpreterThreadToCurrent+00023793
[ 32] 0x00000000fd01d347   D:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00578375 iqm::UserEvalPlugin::pre+00030679
[ 33] 0x00000000fd029e7c   D:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00630396 iqm::UserEvalPlugin::pre+00082700
[ 34] 0x00000000fd017480   D:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00554112 iqm::UserEvalPlugin::pre+00006416
[ 35] 0x00000000fd02c99a   D:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00641434 iqm::UserEvalPlugin::pre+00093738
[ 36] 0x00000000fcff9a37   D:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00432695 iqm::PackagedTaskPlugin::PackagedTaskPlugin+00000727
[ 37] 0x00000000fcffa08f   D:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00434319 iqm::PackagedTaskPlugin::execute+00000575
[ 38] 0x00000000fcff9aa9   D:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00432809 iqm::PackagedTaskPlugin::PackagedTaskPlugin+00000841
[ 39] 0x00000000fcff9f04   D:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00433924 iqm::PackagedTaskPlugin::execute+00000180
[ 40] 0x00000000fcfd42fa   D:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00279290 iqm::Iqm::setupIqmFcnPtrs+00071530
[ 41] 0x00000000fcfd41d3   D:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00278995 iqm::Iqm::setupIqmFcnPtrs+00071235
[ 42] 0x00000000fcfb9e5a   D:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00171610 iqm::Iqm::deliver+00003274
[ 43] 0x00000000fcfbad2f   D:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00175407 iqm::Iqm::deliver+00007071
[ 44] 0x0000000100108173 D:\Program Files\MATLAB\R2016b\bin\win64\libmwservices.dll+01147251 services::system_events::PpeDispatchHook::dispatchOne+00019059
[ 45] 0x000000010010c3a3 D:\Program Files\MATLAB\R2016b\bin\win64\libmwservices.dll+01164195 sysq::addProcessPendingEventsUnitTestHook+00001923
[ 46] 0x000000010010c580 D:\Program Files\MATLAB\R2016b\bin\win64\libmwservices.dll+01164672 sysq::addProcessPendingEventsUnitTestHook+00002400
[ 47] 0x000000010010d685 D:\Program Files\MATLAB\R2016b\bin\win64\libmwservices.dll+01169029 sysq::getCondition+00002917
[ 48] 0x000000010010e4b2 D:\Program Files\MATLAB\R2016b\bin\win64\libmwservices.dll+01172658 svWS_ProcessPendingEvents+00000162
[ 49] 0x0000000015ad6b7d   D:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00224125 mcr::runtime::setInterpreterThreadToCurrent+00026413
[ 50] 0x0000000015ad726a   D:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00225898 mcr::runtime::setInterpreterThreadToCurrent+00028186
[ 51] 0x0000000015ace385   D:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00189317 mcr_process_events+00010293
[ 52] 0x0000000015ad02d2   D:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00197330 mcr_process_events+00018306
[ 53] 0x0000000015a1bd0e D:\Program Files\MATLAB\R2016b\bin\win64\MVMLocal.dll+00245006 mvm_server::inproc::LocalFactory::terminate+00070846
[ 54] 0x00000000fa942cd9   D:\Program Files\MATLAB\R2016b\bin\win64\mvm.dll+01125593 mvm::detail::initLocalMvmHack+00000521
[ 55] 0x00000000fa9432a5   D:\Program Files\MATLAB\R2016b\bin\win64\mvm.dll+01127077 mvm::detail::SessionImpl::privateSession+00000373
[ 56] 0x00000000fa9434b1   D:\Program Files\MATLAB\R2016b\bin\win64\mvm.dll+01127601 mvm::detail::SessionImpl::privateSession+00000897
[ 57] 0x0000000140006fd5 D:\Program Files\MATLAB\R2016b\bin\win64\MATLAB.exe+00028629
[ 58] 0x0000000140007661 D:\Program Files\MATLAB\R2016b\bin\win64\MATLAB.exe+00030305
[ 59] 0x00007ff8335b8364                   C:\Windows\System32\KERNEL32.DLL+00033636 BaseThreadInitThunk+00000020
[ 60] 0x00007ff8340470d1                      C:\Windows\SYSTEM32\ntdll.dll+00422097 RtlUserThreadStart+00000033

This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

If this problem is reproducible, please submit a Service Request via:
    http://www.mathworks.com/support/contact_us/

A technical support engineer might contact you with further information.

Thank you for your help.** This crash report has been saved to disk as C:\Users\hgsxx\AppData\Local\Temp\matlab_crash_dump.14132-1 **

Caught MathWorks::System::FatalException
[Please exit and restart MATLAB]>>

代码如下:

x=[1028.371654        959.1841538        956.84571        27.10416667        27.37333333        25.75
959.1841538        956.84571        939.7041246        27.37333333        25.75        25.65833333
956.84571        939.7041246        886.8804196        25.75        25.65833333        25.5925
939.7041246        886.8804196        810.1564075        25.65833333        25.5925        25.26833333
886.8804196        810.1564075        766.6538244        25.5925        25.26833333        25.13333333
810.1564075        766.6538244        777.3155086        25.26833333        25.13333333        25.34166667
766.6538244        777.3155086        708.5305564        25.13333333        25.34166667        25.54
777.3155086        708.5305564        1138.258526        25.34166667        25.54        30.63083333
708.5305564        1138.258526        1151.379901        25.54        30.63083333        30.7125
1138.258526        1151.379901        1156.958557        30.63083333        30.7125        30.675
1151.379901        1156.958557        1171.215125        30.7125        30.675        30.82583333
1156.958557        1171.215125        1161.593226        30.675        30.82583333        30.4975
1171.215125        1161.593226        781.6023678        30.82583333        30.4975        27.84666667
1161.593226        781.6023678        612.17396        30.4975        27.84666667        27.275
781.6023678        612.17396        609.070022        27.84666667        27.275        27.70583333
612.17396        609.070022        607.4263711        27.275        27.70583333        27.85666667
609.070022        607.4263711        640.2421636        27.70583333        27.85666667        27.845
607.4263711        640.2421636        1392.781029        27.85666667        27.845        25.93416667
640.2421636        1392.781029        748.9545634        27.845        25.93416667        25.955
1392.781029        748.9545634        1165.295812        25.93416667        25.955        25.98916667
748.9545634        1165.295812        1129.890453        25.955        25.98916667        26.02833333
1165.295812        1129.890453        1088.605079        25.98916667        26.02833333        26.0625
1129.890453        1088.605079        1069.821424        26.02833333        26.0625        26.09
1088.605079        1069.821424        1094.441434        26.0625        26.09        26.11083333
1069.821424        1094.441434        1147.30122        26.09        26.11083333        26.12666667
1094.441434        1147.30122        1182.625624        26.11083333        26.12666667        26.135
1147.30122        1182.625624        1171.851114        26.12666667        26.135        26.13571429
1182.625624        1171.851114        1416.323402        26.135        26.13571429        30.79583333
1171.851114        1416.323402        1402.490374        26.13571429        30.79583333        31.24333333
1416.323402        1402.490374        1425.07512        30.79583333        31.24333333        31.48083333
1402.490374        1425.07512        1417.48991        31.24333333        31.48083333        31.49416667
1425.07512        1417.48991        1410.82007        31.48083333        31.49416667        31.30583333
1417.48991        1410.82007        1395.041333        31.49416667        31.30583333        31.01666667
1410.82007        1395.041333        1402.41428        31.30583333        31.01666667        30.90833333
1395.041333        1402.41428        1402.16707        31.01666667        30.90833333        31.065
1402.41428        1402.16707        1402.479577        30.90833333        31.065        30.98166667
1402.16707        1402.479577        1398.284501        31.065        30.98166667        31.04
1402.479577        1398.284501        1786.600513        30.98166667        31.04        28.44111111
1398.284501        1786.600513        1022.58609        31.04        28.44111111        29.78083333
1786.600513        1022.58609        794.9068274        28.44111111        29.78083333        28.47833333
1022.58609        794.9068274        670.7098925        29.78083333        28.47833333        27.8975
794.9068274        670.7098925        1347.161576        28.47833333        27.8975        27.39666667
670.7098925        1347.161576        1514.301902        27.8975        27.39666667        26.55916667
1347.161576        1514.301902        1556.678165        27.39666667        26.55916667        28.49166667
1514.301902        1556.678165        1689.186937        26.55916667        28.49166667        29.2575
1556.678165        1689.186937        1650.380243        28.49166667        29.2575        29.44666667
1689.186937        1650.380243        1626.521117        29.2575        29.44666667        29.22571429
1650.380243        1626.521117        1508.872806        29.44666667        29.22571429        28.43333333
1626.521117        1508.872806        1526.508911        29.22571429        28.43333333        27.91916667
1508.872806        1526.508911        1653.658951        28.43333333        27.91916667        28.00333333
1526.508911        1653.658951        1665.527551        27.91916667        28.00333333        28.405
1653.658951        1665.527551        1664.722489        28.00333333        28.405        28.37833333
1665.527551        1664.722489        1633.289333        28.405        28.37833333        28.59083333
1664.722489        1633.289333        1644.415188        28.37833333        28.59083333        28.68166667
1633.289333        1644.415188        1664.797147        28.59083333        28.68166667        28.80333333
1644.415188        1664.797147        1673.686013        28.68166667        28.80333333        28.8575
1664.797147        1673.686013        1627.213411        28.80333333        28.8575        28.97166667
1673.686013        1627.213411        2499.805708        28.8575        28.97166667        30.03083333
1627.213411        2499.805708        1835.908291        28.97166667        30.03083333        29.01666667
2499.805708        1835.908291        1970.353867        30.03083333        29.01666667        29.38416667
1835.908291        1970.353867        1896.792688        29.01666667        29.38416667        29.44333333
1970.353867        1896.792688        697.6351053        29.38416667        29.44333333        29.46083333
1896.792688        697.6351053        672.9046116        29.44333333        29.46083333        30.67545455
697.6351053        672.9046116        545.8299657        29.46083333        30.67545455        31.72583333
672.9046116        545.8299657        576.4885672        30.67545455        31.72583333        30.12166667
545.8299657        576.4885672        574.3578818        31.72583333        30.12166667        29.84
576.4885672        574.3578818        586.4742195        30.12166667        29.84        29.82166667
574.3578818        586.4742195        1468.855021        29.84        29.82166667        31.37333333
586.4742195        1468.855021        886.6352393        29.82166667        31.37333333        31.66083333
2699.797085        2583.04259        2552.74549        32.11583333        32.07916667        32.22666667
2583.04259        2552.74549        2297.956451        32.07916667        32.22666667        31.74
2552.74549        2297.956451        2176.422161        32.22666667        31.74        31.00333333
2297.956451        2176.422161        2057.532399        31.74        31.00333333        30.6125
2176.422161        2057.532399        2176.500701        31.00333333        30.6125        30.5925
2057.532399        2176.500701        2385.168589        30.6125        30.5925        30.54916667
2176.500701        2385.168589        2369.154109        30.5925        30.54916667        30.68
2385.168589        2369.154109        2094.301853        30.54916667        30.68        30.69833333
2369.154109        2094.301853        2510.571627        30.68        30.69833333        30.09
2094.301853        2510.571627        2362.31383        30.69833333        30.09        30.00916667
2510.571627        2362.31383        2367.871701        30.09        30.00916667        29.88166667
2362.31383        2367.871701        2249.666409        30.00916667        29.88166667        29.3275
2367.871701        2249.666409        2059.333555        29.88166667        29.3275        29.79416667
2249.666409        2059.333555        1926.228167        29.3275        29.79416667        29.465
2059.333555        1926.228167        2037.977193        29.79416667        29.465        29.075
1926.228167        2037.977193        2127.439716        29.465        29.075        29.00666667
2037.977193        2127.439716        1648.714024        29.075        29.00666667        28.13384615
2127.439716        1648.714024        1561.640429        29.00666667        28.13384615        27.43
1648.714024        1561.640429        2292.351138        28.13384615        27.43        29.8
1561.640429        2292.351138        2112.7879        27.43        29.8        29.45333333
2292.351138        2112.7879        2163.402464        29.8        29.45333333        29.59416667
2112.7879        2163.402464        2050.27454        29.45333333        29.59416667        28.83583333
2163.402464        2050.27454        1933.826947        29.59416667        28.83583333        29.32
2050.27454        1933.826947        1804.186918        28.83583333        29.32        29.26
1933.826947        1804.186918        1703.58851        29.32        29.26        28.29583333
1804.186918        1703.58851        1256.163552        29.26        28.29583333        26.845
1703.58851        1256.163552        1479.70762        28.29583333        26.845        27.1875
1256.163552        1479.70762        1518.980446        26.845        27.1875        27.29
1479.70762        1518.980446        2616.011448        27.1875        27.29        27.82666667
1518.980446        2616.011448        1802.886167        27.29        27.82666667        28.23583333
2616.011448        1802.886167        1728.592329        27.82666667        28.23583333        27.93166667
1802.886167        1728.592329        1091.740875        28.23583333        27.93166667        27.80833333
1728.592329        1091.740875        1535.095214        27.93166667        27.80833333        28.12083333
1091.740875        1535.095214        2023.706186        27.80833333        28.12083333        29.90916667
1535.095214        2023.706186        1959.425668        28.12083333        29.90916667        29.53333333
2023.706186        1959.425668        1971.848453        29.90916667        29.53333333        29.22083333
1959.425668        1971.848453        2120.959504        29.53333333        29.22083333        29.8575
1971.848453        2120.959504        1704.870338        29.22083333        29.8575        29.83583333
2120.959504        1704.870338        1313.671485        29.8575        29.83583333        28.65333333
1704.870338        1313.671485        1858.197254        29.83583333        28.65333333        29.04
1313.671485        1858.197254        1961.828444        28.65333333        29.04        29.22083333
1858.197254        1961.828444        2116.620446        29.04        29.22083333        29.8575
1961.828444        2116.620446        1817.866018        29.22083333        29.8575        29.83583333
2116.620446        1817.866018        1433.93257        29.8575        29.83583333        28.67571429
1817.866018        1433.93257        2285.964682        29.83583333        28.67571429        30.16666667
1433.93257        2285.964682        2205.521073        28.67571429        30.16666667        29.82583333
2285.964682        2205.521073        1919.215912        30.16666667        29.82583333        29.94583333
2205.521073        1919.215912        1979.44367        29.82583333        29.94583333        30.2
1919.215912        1979.44367        1843.382092        29.94583333        30.2        30.07666667
1979.44367        1843.382092        2247.560871        30.2        30.07666667        30.06416667
1843.382092        2247.560871        1873.134762        30.07666667        30.06416667        30.08333333
2247.560871        1873.134762        1875.413956        30.06416667        30.08333333        29.91416667
1873.134762        1875.413956        2003.6789        30.08333333        29.91416667        29.61833333
1875.413956        2003.6789        1952.953007        29.91416667        29.61833333        29.5
2003.6789        1952.953007        1043.986635        29.61833333        29.5        29.5
1952.953007        1043.986635        1338.110741        29.5        29.5        28.38181818
1043.986635        1338.110741        1750.614398        29.5        28.38181818        32.73416667
1338.110741        1750.614398        1871.176146        28.38181818        32.73416667        29.23666667
1750.614398        1871.176146        1395.290968        32.73416667        29.23666667        26.24
1871.176146        1395.290968        1431.744263        29.23666667        26.24        26.42583333
1395.290968        1431.744263        1429.275226        26.24        26.42583333        26.6325
1431.744263        1429.275226        1430.361559        26.42583333        26.6325        26.7375
1429.275226        1430.361559        1396.361311        26.6325        26.7375        26.875
1430.361559        1396.361311        1331.847452        26.7375        26.875        27.03583333
1396.361311        1331.847452        1272.224547        26.875        27.03583333        26.955
1331.847452        1272.224547        1280.220597        27.03583333        26.955        26.98
1272.224547        1280.220597        2584.189937        26.955        26.98        29.832
1280.220597        2584.189937        2465.185495        26.98        29.832        30.63583333
2584.189937        2465.185495        2337.469502        29.832        30.63583333        30.35583333
2465.185495        2337.469502        2323.709064        30.63583333        30.35583333        30.52166667
2337.469502        2323.709064        2333.949913        30.35583333        30.52166667        30.74416667
2323.709064        2333.949913        2319.830043        30.52166667        30.74416667        30.81416667
2333.949913        2319.830043        2108.15023        30.74416667        30.81416667        30.57666667
2319.830043        2108.15023        1572.099018        30.81416667        30.57666667        29.37333333
2108.15023        1572.099018        1747.790212        30.57666667        29.37333333        28.59916667
1572.099018        1747.790212        1894.641548        29.37333333        28.59916667        28.61666667
1747.790212        1894.641548        1842.296674        28.59916667        28.61666667        28.67666667
1894.641548        1842.296674        1083.39741        28.61666667        28.67666667        29.352
1842.296674        1083.39741        961.740923        28.67666667        29.352        30.12416667
1083.39741        961.740923        911.5714507        29.352        30.12416667        29.93166667
961.740923        911.5714507        847.9055651        30.12416667        29.93166667        29.76
911.5714507        847.9055651        861.7889418        29.93166667        29.76        29.855
847.9055651        861.7889418        846.3753926        29.76        29.855        29.98833333
861.7889418        846.3753926        832.8252524        29.855        29.98833333        30.09166667
846.3753926        832.8252524        771.9408473        29.98833333        30.09166667        29.97083333
832.8252524        771.9408473        818.2735089        30.09166667        29.97083333        29.66916667
771.9408473        818.2735089        764.7561174        29.97083333        29.66916667        29.16
818.2735089        764.7561174        734.777984        29.66916667        29.16        28.10833333
764.7561174        734.777984        2463.54149        29.16        28.10833333        29.61636364
734.777984        2463.54149        2226.329897        28.10833333        29.61636364        29.85
2463.54149        2226.329897        2204.032365        29.61636364        29.85        29.60833333
2226.329897        2204.032365        2119.208768        29.85        29.60833333        29.60083333
2204.032365        2119.208768        1697.082568        29.60833333        29.60083333        29.21166667
2119.208768        1697.082568        1674.809387        29.60083333        29.21166667        29.35166667
1697.082568        1674.809387        1656.671669        29.21166667        29.35166667        29.3075
1674.809387        1656.671669        1699.927578        29.35166667        29.3075        29.15583333
1656.671669        1699.927578        1745.430376        29.3075        29.15583333        29.31416667
1699.927578        1745.430376        1772.569657        29.15583333        29.31416667        29.315
1745.430376        1772.569657        1786.693828        29.31416667        29.315        33.34916667
1772.569657        1786.693828        2207.282007        29.315        33.34916667        34.1575
1786.693828        2207.282007        2341.178071        33.34916667        34.1575        34.0725
2207.282007        2341.178071        2294.047058        34.1575        34.0725        33.9175
2341.178071        2294.047058        2233.741453        34.0725        33.9175        33.57416667
2294.047058        2233.741453        2106.501031        33.9175        33.57416667        33.32583333
2233.741453        2106.501031        1898.488567        33.57416667        33.32583333        32.82916667
2106.501031        1898.488567        2072.230095        33.32583333        32.82916667        32.745
1898.488567        2072.230095        1996.396274        32.82916667        32.745        32.66166667
2072.230095        1996.396274        1824.257765        32.745        32.66166667        32.55583333
1996.396274        1824.257765        2473.683995        32.66166667        32.55583333        29.76833333
1824.257765        2473.683995        2410.234825        32.55583333        29.76833333        30.135
2473.683995        2410.234825        2091.346487        29.76833333        30.135        29.50833333
2410.234825        2091.346487        2207.780774        30.135        29.50833333        29.52916667
2091.346487        2207.780774        1979.775708        29.50833333        29.52916667        29.61166667
2207.780774        1979.775708        1891.914525        29.52916667        29.61166667        29.74583333
1979.775708        1891.914525        1862.9024        29.61166667        29.74583333        29.63333333
1891.914525        1862.9024        1888.482779        29.74583333        29.63333333        29.83833333
1862.9024        1888.482779        1921.714952        29.63333333        29.83833333        30.54083333
1888.482779        1921.714952        1947.7835        29.83833333        30.54083333        30.3425
1921.714952        1947.7835        1917.475012        30.54083333        30.3425        29.89083333
1947.7835        1917.475012        2722.565495        30.3425        29.89083333        28.42818182
1917.475012        2722.565495        2626.925489        29.89083333        28.42818182        29.12416667
2722.565495        2626.925489        2228.672572        28.42818182        29.12416667        28.69
2626.925489        2228.672572        2275.036348        29.12416667        28.69        28.76083333
2228.672572        2275.036348        2035.530608        28.69        28.76083333        28.45833333
2275.036348        2035.530608        1917.744953        28.76083333        28.45833333        28.3425
2035.530608        1917.744953        1692.782221        28.45833333        28.3425        28.44083333
1917.744953        1692.782221        1781.876525        28.3425        28.44083333        28.93
1692.782221        1781.876525        1725.760549        28.44083333        28.93        29.43666667
]

y = [939.7041246
886.8804196
810.1564075
766.6538244
777.3155086
708.5305564
1138.258526
1151.379901
1156.958557
1171.215125
1161.593226
781.6023678
612.17396
609.070022
607.4263711
640.2421636
1392.781029
748.9545634
1165.295812
1129.890453
1088.605079
1069.821424
1094.441434
1147.30122
1182.625624
1171.851114
1416.323402
1402.490374
1425.07512
1417.48991
1410.82007
1395.041333
1402.41428
1402.16707
1402.479577
1398.284501
1786.600513
1022.58609
794.9068274
670.7098925
1347.161576
1514.301902
1556.678165
1689.186937
1650.380243
1626.521117
1508.872806
1526.508911
1653.658951
1665.527551
1664.722489
1633.289333
1644.415188
1664.797147
1673.686013
1627.213411
2499.805708
1835.908291
1970.353867
1896.792688
697.6351053
672.9046116
545.8299657
576.4885672
574.3578818
586.4742195
1468.855021
886.6352393
754.8599557
2297.956451
2176.422161
2057.532399
2176.500701
2385.168589
2369.154109
2094.301853
2510.571627
2362.31383
2367.871701
2249.666409
2059.333555
1926.228167
2037.977193
2127.439716
1648.714024
1561.640429
2292.351138
2112.7879
2163.402464
2050.27454
1933.826947
1804.186918
1703.58851
1256.163552
1479.70762
1518.980446
2616.011448
1802.886167
1728.592329
1091.740875
1535.095214
2023.706186
1959.425668
1971.848453
2120.959504
1704.870338
1313.671485
1858.197254
1961.828444
2116.620446
1817.866018
1433.93257
2285.964682
2205.521073
1919.215912
1979.44367
1843.382092
2247.560871
1873.134762
1875.413956
2003.6789
1952.953007
1043.986635
1338.110741
1750.614398
1871.176146
1395.290968
1431.744263
1429.275226
1430.361559
1396.361311
1331.847452
1272.224547
1280.220597
2584.189937
2465.185495
2337.469502
2323.709064
2333.949913
2319.830043
2108.15023
1572.099018
1747.790212
1894.641548
1842.296674
1083.39741
961.740923
911.5714507
847.9055651
861.7889418
846.3753926
832.8252524
771.9408473
818.2735089
764.7561174
734.777984
2463.54149
2226.329897
2204.032365
2119.208768
1697.082568
1674.809387
1656.671669
1699.927578
1745.430376
1772.569657
1786.693828
2207.282007
2341.178071
2294.047058
2233.741453
2106.501031
1898.488567
2072.230095
1996.396274
1824.257765
2473.683995
2410.234825
2091.346487
2207.780774
1979.775708
1891.914525
1862.9024
1888.482779
1921.714952
1947.7835
1917.475012
2722.565495
2626.925489
2228.672572
2275.036348
2035.530608
1917.744953
1692.782221
1781.876525
1725.760549
1787.929433];

Xdata=mapminmax(x')';   %按照行归一化[-1 1]
Ydata=mapminmax(y')';
[M,N]=size(x);
X_train=Xdata(1:round(3*M/4),:);X_test=Xdata(round(3*M/4)+1:M,:);
Y_train=Ydata(1:round(3*M/4),:);Y_test=Ydata(round(3*M/4)+1:M,:);
[mse,bestc,bestg] = SVMcgForRegress(Y_train,X_train);%参数寻优    % bestc=3.0314   bestg=0.0118
% 回归模型
str = ['-s 3 -t 2 -c ',num2str(bestc),' -g ',num2str(bestg),' -p 0.01'];
model = svmtrain(Y_train,X_train,str);
% 模型预测
[py,mse] = svmpredict(Y_test,X_test,model);  
% 返归一化
miny=min(y);maxy=max(y);
py=postmnmx(py,miny,maxy);
% 显示预测结果
Y_test=y(round(3*M/4)+1:M,:);  % 原始数据

plot(1:length(py),Y_test,'o'); 
hold on
plot(1:length(py),py); % 预测数据
hold off
Y_test=y(round(3*M/4)+1:M,:);  % 原始数据
plot(1:length(py),Y_test,'o'); 
hold on
plot(1:length(py),py); % 预测数据
hold off
Y_test=y(round(3*M/4)+1:M,:);  % 原始数据
plot(1:length(py),Y_test,'o'); 
hold on
plot(1:length(py),py); % 预测数据

求助!matlab软件下SVM(支持向量机)做回归预测,软件版本为2016b看,老是报错看,不知道怎么解决这个问题。相关推荐

  1. 【报错笔记】做struts项目建立jsp文件老是报错

    做struts项目建立jsp文件老是报错,所有项目都一样. 报错原因: 没有导入apache tomcat 解决方法: 点击项目名右键Build Path-Configure Build Path-A ...

  2. 多Kinect下WaitNoneUpdateAll老是报错,烦躁……

    多Kinect下WaitNoneUpdateAll老是报错,烦躁-- 有谁在做多Kinect的啊?我的参考资料如下: http://viml.nchc.org.tw/blog/paper_info.p ...

  3. 解决win10下 git闪退的问题(或者使用git命令报错fatal: open /dev/null or dup failed)

    解决win10下 git闪退的问题(或者使用git命令报错fatal: open /dev/null or dup failed) 本人在win10下安装git完成后,打开闪退,在"运行&q ...

  4. windows下 python 使用 pip 安装TA-Lib报错的原因及解决方法

    windows下 python 使用 pip 安装TA-Lib报错的原因及解决方法 问题环境 问题描述 问题原因 & 解决办法 问题环境 Windows 10 x64 .python 3.8. ...

  5. 在matlab环境下实现支持向量机算法

    作者:faaronzheng 转载请注明出处! 关于支持向量机的理论部分我就不进行介绍了,网上有很多关于支持向量机的讲解.如: 支持向量机通俗导论(理解SVM的三层境界)有兴趣的可以自行查找一下.这里 ...

  6. 机器学习(MATLAB实现)——SVM支持向量机(一)

    SVM支持向量机 支持向量机理论概述 二分类支持向量机 多分类支持向量机 libsvm工具箱使用简介 训练函数 预测函数 libsvm参数实例 一点拓展 参考文献 支持向量机理论概述 核函数用于将支持 ...

  7. 英语答题测试的软件叫什么,英语做题软件哪个好 有答案解析的英语做题软件分享...

    对于一些即将参与重要英语考试的考生来说,每天刷题练习肯定是不可避免的事情,但如果你想要更高效的刷题,让自己的刷题时间更有价值,那就来看看推荐给你的这些英语做题软件. 类型:学习 语言:简体中文 星级: ...

  8. 事业编职业技能测试刷题软件,事业单位考试做题软件哪个好?试试这个简直不要太好用啦!...

    事业单位考试做题软件哪个好?试试这个简直不要太好用啦! 2020-01-0916:57:35 来源: 作者:zenglimei 事业单位考试又称事业编制考试,这项工作由各用人单位的人事部门委托省级和地 ...

  9. linux下安装gcc及设置多版本gcc多版本共存(如果enable静态库,会报错,不知道为什么,忽略静态库就没问题了)...

    背景:1.在做文本挖掘的时候,安装"结巴"算法包,需要gcc版本>4.6,但是不知道是不是有内核或其他东西是gcc低版本支持的,只好安装多版本: 2.linux版本:Red ...

最新文章

  1. 自考计算机英语答题技巧,自考英语题型答题技巧-自考英语写作
  2. ExtJs学习准备工作(二) firebug firefox插件的安装
  3. rlm sql mysql.so_UBUUTU7.10上安装配置freeradius+mysql+rp-pppoe手记
  4. EclipseLink MOXy和用于JSON处理的Java API –对象模型API
  5. 泛型字典 0104 c# 1613648530
  6. 弹框alertView
  7. ng-zorro-antd引入less时错误解决记录
  8. android studio 新建的项目无法绘制界面
  9. 使用matlab解决收益和风险问题 数学建模算法与应用
  10. 阿里云对象存储OSS简介
  11. 新东方的负载均衡架构探索和实践
  12. 如何快速开发一款APP
  13. 锁定计算机后qq能远程吗,如何通过QQ进行远程控制(利用QQ远程协助在不同网络下远程控制电脑)...
  14. gateway笔记TODO
  15. 高德地图 绘制自定义Marker上部文本
  16. 基本的LC串联和并联振荡电路分析
  17. (11)企业合并长期股权投资
  18. 使用Zxing在Java中生成QR码
  19. 区块链 - DAPP
  20. dwz导出excel java_dwz怎么导出excel

热门文章

  1. echart图片库_附录:ECharts图属性介绍-统计图
  2. 在微信公众号中写html代码吗,微信公众号内容如何利用html编辑?
  3. “燕云十六将”之Jerry葛涵涛
  4. 寒冬,是修炼内功的最好机会
  5. 【行为管理篇】01. 恢复出厂及登录 ❀ 深信服上网行为管理
  6. 分糖果 小明从糖果盒中
  7. Linux虚拟机配置NAT模式上网时,ping不通百度等网站但能ping通局域网ip解决办法
  8. latch: cache buffers chains 阻塞 buffer busy waits
  9. Vue的created的使用示例
  10. 位列首位!百度智能云开物入选“双跨”平台国家队