|
From: | Doug Stewart |
Subject: | Re: write empty in excel |
Date: | Sat, 13 Jul 2019 09:26:32 -0400 |
If I try the following:for k=1:6v{k} = k;
endv{4} = [];Then I get:v =
{
[1,1] = 1
[1,2] = 2
[1,3] = 3
[1,4] = [](0x0)
[1,5] = 5
[1,6] = 6
}Using curly braces creates cell arrays, which have flexibility to use different sizes and different types of data. You can do this too:v(4) = "Hello"
v =
{
[1,1] = 1
[1,2] = 2
[1,3] = 3
[1,4] = Hello
[1,5] = 5
[1,6] = 6
}I'm not sure if there's a better way to print it to a spreadsheet since I've never done that before, but I think you could do it with fprintf.- Brett GreenOn Sat, Jul 13, 2019 at 8:30 AM gigiolone123 via Help-octave <address@hidden> wrote:hi Doug
it's not possible...it give error
>> v(1)=1
v = 1
>> v(2)=2
v =
1 2
>> v(3)=3
v =
1 2 3
>> v(4)=" "
error: =: nonconformant arguments (op1 is 1x1, op2 is 1x2)
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
[Prev in Thread] | Current Thread | [Next in Thread] |