Thread Subject: conversion of cell array to string

Subject: conversion of cell array to string

From: Elshaymaa M.E.

Date: 21 Nov, 2009 17:42:05

Message: 1 of 6

Dear All
Please, can any one help me in converting a cell array to a string to be read from excel:
Example:
d='d' 'o' 'o' 'r' is the cell array that i want to convert to a string 'door' to be put all in one cell in excel to read using excel.
                                          Thanks in advance

Subject: conversion of cell array to string

From: MatlabFCT NG

Date: 21 Nov, 2009 17:57:05

Message: 2 of 6

Hi,

use char(d).

d=[{'d' } {'o'} { 'o'} { 'r' }];
>> d

d =

    'd' 'o' 'o' 'r'

>> char(d)

ans =

d
o
o
r



On 21 Nov, 17:42, "Elshaymaa M.E." <engenas_mas...@yahoo.com> wrote:
> Dear All
> Please, can any one help me in converting a cell array to a string to be read from excel:
> Example:
> d='d'    'o'    'o'     'r'   is the cell array that i want to convert to a string 'door' to be put all in one cell in excel to read using excel.
>                                           Thanks in advance

Subject: conversion of cell array to string

From: Matt

Date: 21 Nov, 2009 20:36:02

Message: 3 of 6

"Elshaymaa M.E." <engenas_master@yahoo.com> wrote in message <he98pd$3k2$1@fred.mathworks.com>...
> Dear All
> Please, can any one help me in converting a cell array to a string to be read from excel:
> Example:
> d='d' 'o' 'o' 'r' is the cell array that i want to convert to a string 'door' to be put all in one cell in excel to read using excel.

This will work

myString=[d{:}];

see also

help cat
help horzcat
help vertcat

Subject: Close Excel using MATLAB

From: Elshaymaa M.E.

Date: 22 Nov, 2009 09:33:04

Message: 4 of 6

Dear Sir
Thanks for your reply, i tried this step and it is ok.
Shall i ask you how to close excel file using matlab.
i used (winopen) to open the excel file.

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Thanks in advance

Subject: Close Excel using MATLAB

From: Matt

Date: 22 Nov, 2009 14:28:02

Message: 5 of 6

"Elshaymaa M.E." <engenas_master@yahoo.com> wrote in message <heb0gg$h73$1@fred.mathworks.com>...
> Dear Sir
> Thanks for your reply, i tried this step and it is ok.
> Shall i ask you how to close excel file using matlab.
> i used (winopen) to open the excel file.
>
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Thanks in advance

Dunno. But why do you have to open the excel file at all. Why not use xlsread() and xlswrite()?

Subject: conversion of cell array to string

From: Elshaymaa M.E.

Date: 23 Nov, 2009 07:07:03

Message: 6 of 6

MatlabFCT NG <matfctng@gmail.com> wrote in message <c66c9442-385d-4c3c-b445-a0080020a0a2@k4g2000yqb.googlegroups.com>...
> Hi,
>
> use char(d).
>
> d=[{'d' } {'o'} { 'o'} { 'r' }];
> >> d
>
> d =
>
> 'd' 'o' 'o' 'r'
>
> >> char(d)
>
> ans =
>
> d
> o
> o
> r
>
>
>
> On 21 Nov, 17:42, "Elshaymaa M.E." <engenas_mas...@yahoo.com> wrote:
> > Dear All
> > Please, can any one help me in converting a cell array to a string to be read from excel:
> > Example:
> > d='d' ? ?'o' ? ?'o' ? ? 'r' ? is the cell array that i want to convert to a string 'door' to be put all in one cell in excel to read using excel.
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Thanks in advance



Dear Sir
Shall i ask how to close excel file using matlab.
i used (winopen) to open the excel file (i must open and close it using MATLB relating to my application) .
                                         Thanks in advance

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
close excel usi... Elshaymaa M.E. 22 Nov, 2009 04:34:13
conversion of c... Elshaymaa M.E. 21 Nov, 2009 12:44:06
rssFeed for this Thread

Contact us at files@mathworks.com