Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MATLAB C++ problems, help~!

MATLAB C++ problems, help~!

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++question
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vincent Sim
    wrote on last edited by
    #1

    hi everybody, i am facing some matlab c++ problems. i am looking for some solutions for them. anybody can help me? thank you very much. :) p/s: thank you Jwood for your information. Problem 1: MATLAB SOURCE CODE: [features, targets] = improved_DA1(x, [cluster,0.95]); MATLAB C++ CONVERSION: mwArray cluster ; improved_DA(x, empty(cluster,0.95)); after compiling,…… D:\others\im\me.cpp(116) : error C2660: 'empty' : function does not take 2 parameters Problem 2: MATLAB C++ CONVERSION: I3=uint8(I2); After compiling,……. D:\others\im\me.cpp(137) : error C2065: 'uint8' : undeclared identifier Problem 3: MATLAB SOURCE CODE: Smu=zeros(1,Nmu); for i=1:Ncent, Smu(i) = sum(std(train_features(:,find(label == i))')); MATLAB C++ CONVERSION: Smu = zeros(1,Nmu); for (i = 1 ; i<=Ncent ; i++) { /*232*/ Smu(i) = sum(std(train_features(:,find(label == i))')); } after compiling,….. D:\others\im\me.cpp(232) : error C2001: newline in constant Problem 4: MATLAB C++: …………… double Tmin; mwArray T; Nmu = params(1); epsi = params(2); /*167*/ T= 3*max(eig(cov(train_features',1)')); //Initial temperature Tmin = 0.01; …………. After compiling……. D:\others\im\me.cpp(167) : fatal error C1057: unexpected end of file in macro expansion vincent sim

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups