Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9179589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:50:04+00:00 2026-06-17T17:50:04+00:00

I feel at home in C# and I’ll design a console application that will

  • 0

I feel at home in C# and I’ll design a console application that will fetch some data from a web service. I’d like to allow a group of scientists to use the data in MatLab. One way to achieve that is to store it in a file on the HDD and then load the contents of it into MatLab.

That got me thinking, though. Is it possible to create a function in MatLab that calls an EXE created in C# so my scientific friends can go:

a = GetMeSomeData()

and populate the variable a with the response of the service? (I would, of course, format the data using my C# code so it’ll fit the matrix model of MatLab.)

I’ve done some googling before I start working on this but most of the stuff I’ve found is about an old version of MatLab (2007) and it’s said something about creating a COM object.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:50:06+00:00Added an answer on June 17, 2026 at 5:50 pm

    You can easily call functions in a .NET assembly. First you have to tell Matlab what assembly you are going to use:

    NET.addAssembly("path//to//assembly.dll");
    

    After that, you just call functions in your m-files:

    foo = Namespace.Class.FunctionFoo(input1, input2);
    bar = Namespace.Class.FunctionBar(input1, input2);
    

    You can even have multiple outputs. A C# function like this:

    public void MultipleOut(int in1, int in2, out int out1, out int out2)
    { ... }
    

    can be called like this in Matlab:

    [out1, out2] = Namespace.Class.MultipleOut(in1, in2);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I feel like such a noob asking this but, for some reason a horizontal
Some context: (Feel free to skip ahead) I have a module that processes complex
I know some solutions to this, but I feel like I'm always taking a
We are going to build a enterprise grade application on Web and for that
I feel like I am missing obvious here, but I will post anyway. I
This is one of those things that just makes me feel like an idjut.
I feel like I am not writing this correctly and this is my first
I feel like I've only ever seen this here on SO, but I can't
I know that there are a few questions like this on SOF, but I
UPDATE: Feel free to give me negative votes because the issue was that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.