f



How to embed a matlab code behind an excel worksheet?

I want to write a matlab code that will work behind excel. Basically,
the users will enter input to an excel sheet, click a button on the
secreen and this will trigger a matlab code that comes with the excel
sheet. The code will run and give the output on an excel sheet.

The users don't necessarily have matlab. They should be able to run
the code though.

Is there a quick and easy way to combine my matlab code with an excel
sheet?
thanks,
onur.

ps. I am familiar with vbasic. However, I prefer to include a matlab
code since it runs faster with vectors.
0
onuruncu (27)
11/10/2005 12:05:28 AM
comp.soft-sys.matlab 211266 articles. 15 followers. lunamoonmoon (258) is leader. Post Follow

3 Replies
622 Views

Similar Articles

[PageSpeed] 12


"Onur" <onuruncu@yahoo.com> wrote in message 
news:ef1af8d.-1@webx.raydaftYaTP...
>I want to write a matlab code that will work behind excel. Basically,
> the users will enter input to an excel sheet, click a button on the
> secreen and this will trigger a matlab code that comes with the excel
> sheet. The code will run and give the output on an excel sheet.
>
> The users don't necessarily have matlab. They should be able to run
> the code though.
>
> Is there a quick and easy way to combine my matlab code with an excel
> sheet?
> thanks,
> onur.
>
> ps. I am familiar with vbasic. However, I prefer to include a matlab
> code since it runs faster with vectors.

So you want to run MATLAB without having MATLAB? Sorry, but running ML code 
requires more than just the words. Now, if your users HAD MATLAB, they could 
invoke the program from Excel and operate on data in the Excel file; but 
without having MATLAB? No can do.

Cheers,
Brett

-- 
char(cumsum(...
[115 -11 7 -10 7 7 -4 -1 -46 40 -3 7 -3 15 -74 64 -5 -1 -58 57 8 7])) 


0
11/10/2005 3:13:32 PM
Why Can not?
use Excel Builder to compile your Matlab code into a COM object and
invoke as a regular excel function. It is very easy, with graphical
interface...etc.

COM built functions do not require Matlab in the host machine.

Am I misunderstanding something?

Amir

Brett Shoelson wrote:
>
>
>
>
> "Onur" <onuruncu@yahoo.com> wrote in message
> news:ef1af8d.-1@webx.raydaftYaTP...
>>I want to write a matlab code that will work behind excel.
> Basically,
>> the users will enter input to an excel sheet, click a button on
> the
>> secreen and this will trigger a matlab code that comes with the
> excel
>> sheet. The code will run and give the output on an excel sheet.
>>
>> The users don't necessarily have matlab. They should be able to
> run
>> the code though.
>>
>> Is there a quick and easy way to combine my matlab code with an
> excel
>> sheet?
>> thanks,
>> onur.
>>
>> ps. I am familiar with vbasic. However, I prefer to include a
> matlab
>> code since it runs faster with vectors.
>
> So you want to run MATLAB without having MATLAB? Sorry, but running
> ML code
> requires more than just the words. Now, if your users HAD MATLAB,
> they could
> invoke the program from Excel and operate on data in the Excel
> file; but
> without having MATLAB? No can do.
>
> Cheers,
> Brett
>
> --
> char(cumsum(...
> [115 -11 7 -10 7 7 -4 -1 -46 40 -3 7 -3 15 -74 64 -5 -1 -58 57 8
> 7]))
>
>
>
0
amir_seyed (45)
11/10/2005 3:56:32 PM
"Amir" <amir_seyed@yahoo.com> wrote in message 
news:ef1af8d.1@webx.raydaftYaTP...
> Why Can not?
> use Excel Builder to compile your Matlab code into a COM object and
> invoke as a regular excel function. It is very easy, with graphical
> interface...etc.
>
> COM built functions do not require Matlab in the host machine.
>
> Am I misunderstanding something?
>
> Amir
>
> Brett Shoelson wrote:
SNIP <"How can a user call ML from Excel without having ML?" question.>

>> So you want to run MATLAB without having MATLAB? Sorry, but running
>> ML code
>> requires more than just the words. Now, if your users HAD MATLAB,
>> they could
>> invoke the program from Excel and operate on data in the Excel
>> file; but
>> without having MATLAB? No can do.
>>
>> Cheers,
>> Brett

Amir, you are correct, and it seems I misspoke. I've used the C-compiler, 
but not the Excel Builder. Seems that if Onur, the OP, has the Excel Builder 
and a VB compiler, he can compile his code as VB and embed it in Excel.
Thanks.
Brett 


0
11/10/2005 4:00:26 PM
Reply: