MATLAB Answers

saving a data

Asked by FIR

FIR (view profile)

on 29 Mar 2012
Accepted Answer by Jan Simon

Jan Simon (view profile)

I havea data as

g =

```    [1x4 double]
[1x5 double]
[1x4 double]
[1x4 double]
[1x4 double]
[1x5 double]```

please tell how to the values in each and i want to store those values in G

Products

No products are associated with this question.

2 Answers

Jan Simon (view profile)

Answer by Jan Simon

Jan Simon (view profile)

on 29 Mar 2012
Accepted answer

FIR, please, you have written over 100 questions in this forum. You should have learned already that it is impossible to answer "tell how to the values in each". There is no chance that we guess the problems you have with storing those values in G. What about:

```G = g;
```

Is g a cell or is the shown block a copy from a text file?

I do not see a connection between the posted information and the subject "saving a data".

Please, FIR, be more careful with your questions. Reading the current message is a waste of the time of all, who want to help voluntarily.

FIR

FIR (view profile)

on 29 Mar 2012

in g when i view in variable editor i have

[1,2,3,8],like these i have for values in g

i can view these values in variable editor and i know how to display it for ex

for i=1:length(g)
disp({g})
end

these values are displayed in command window ,now i want to save these variables in G

Image Analyst (view profile)

Answer by Image Analyst

Image Analyst (view profile)

on 29 Mar 2012

I agree complete with Jan. So, tell us why did G=g not work. All the vectors inside your individual cells are a different size so it's not possible to stack them all into a 2D numerical display (unless you want to pad the smaller arrays so that they are the same size). Do you want to string them all together into a 1 by 26 vector? You must be more explicit so we don't waste time guessing around all the ambiguities in your message.

Also, there is a celldisp() function that you might want to use rather than disp().

0 Comments

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

New to MATLAB?