

Hi Please help me with this error: operator +: nonconformant arguments (op1 is 1x17, op2 is 1x18) error: called from Project2 at line 14 column 23
The part of the code is: o_vector(i,j) = input('Please enter the '+num2str(j)+... 'th element of the '+i+'th region output vector: ');
Also if i bypass this error I have another errors, for example in this line: Xn = sum(o_vector,'all'); The debuger says "all" is undefined.
Please help me how can I correct these types of errors when using octave instead of Matlab. Thanks


Hi Please help me with this error: operator +: nonconformant arguments (op1 is 1x17, op2 is 1x18) error: called from Project2 at line 14 column 23
The part of the code is: o_vector(i,j) = input('Please enter the '+num2str(j)+... 'th element of the '+i+'th region output vector: ');
Also if i bypass this error I have another errors, for example in this line: Xn = sum(o_vector,'all'); The debuger says "all" is undefined.
Please help me how can I correct these types of errors when using octave instead of Matlab. Thanks
"all" does not appear to be a recognized option for the sum function  see here:
If you just want to concatenate strings, you could do so with
o_vector(i,j) = input( strcat( 'Please enter the ', num2str(j), 'th element of the ', num2str(i), 'th region output vector: ')


Hi Please help me with this error: operator +: nonconformant arguments (op1 is 1x17, op2 is 1x18) error: called from Project2 at line 14 column 23
The part of the code is: o_vector(i,j) = input('Please enter the '+num2str(j)+... 'th element of the '+i+'th region output vector: ');
Also if i bypass this error I have another errors, for example in this line: Xn = sum(o_vector,'all'); The debuger says "all" is undefined.
Please help me how can I correct these types of errors when using octave instead of Matlab. Thanks
you can try this: o_vector(i,j) = input(['Please enter the ' num2str(j) 'th element of the ' i 'th region output vector: ']);
 DAS


Thanks a lot. I solve the input problem and also I have same error in disp function, so I replace "+" with strcat(... , ... , ...) . But I don't know what to do with
Xn = sum(o_vector,'all');
The code has no problem with matlab but has error with octave in this line. Hi Please help me with this error: operator +: nonconformant arguments (op1 is 1x17, op2 is 1x18) error: called from Project2 at line 14 column 23
The part of the code is: o_vector(i,j) = input('Please enter the '+num2str(j)+... 'th element of the '+i+'th region output vector: ');
Also if i bypass this error I have another errors, for example in this line: Xn = sum(o_vector,'all'); The debuger says "all" is undefined.
Please help me how can I correct these types of errors when using octave instead of Matlab. Thanks
"all" does not appear to be a recognized option for the sum function  see here:
If you just want to concatenate strings, you could do so with
o_vector(i,j) = input( strcat( 'Please enter the ', num2str(j), 'th element of the ', num2str(i), 'th region output vector: ')


This is my full code. Thanks for yor help.
Hi Please help me with this error: operator +: nonconformant arguments (op1 is 1x17, op2 is 1x18) error: called from Project2 at line 14 column 23
The part of the code is: o_vector(i,j) = input('Please enter the '+num2str(j)+... 'th element of the '+i+'th region output vector: ');
Also if i bypass this error I have another errors, for example in this line: Xn = sum(o_vector,'all'); The debuger says "all" is undefined.
Please help me how can I correct these types of errors when using octave instead of Matlab. Thanks
"all" does not appear to be a recognized option for the sum function  see here:
If you just want to concatenate strings, you could do so with
o_vector(i,j) = input( strcat( 'Please enter the ', num2str(j), 'th element of the ', num2str(i), 'th region output vector: ')
Please always CC the mailing list.
What do you want to do with Xn and ovector? We cannot help unless we know what you are trying to achieve.


I want Xn to be the sum of all elements in o_vector matrix. In Matlab 2018 and newer versions the
Xn = sum(o_vector,'all'); does this work. But octave doesn't support this. How can I do this in octave?
This is my full code. Thanks for yor help.
Hi Please help me with this error: operator +: nonconformant arguments (op1 is 1x17, op2 is 1x18) error: called from Project2 at line 14 column 23
The part of the code is: o_vector(i,j) = input('Please enter the '+num2str(j)+... 'th element of the '+i+'th region output vector: ');
Also if i bypass this error I have another errors, for example in this line: Xn = sum(o_vector,'all'); The debuger says "all" is undefined.
Please help me how can I correct these types of errors when using octave instead of Matlab. Thanks
"all" does not appear to be a recognized option for the sum function  see here:
If you just want to concatenate strings, you could do so with
o_vector(i,j) = input( strcat( 'Please enter the ', num2str(j), 'th element of the ', num2str(i), 'th region output vector: ')
Please always CC the mailing list.
What do you want to do with Xn and ovector? We cannot help unless we know what you are trying to achieve.


I want Xn to be the sum of all elements in o_vector matrix. In Matlab 2018 and newer versions the
Xn = sum(o_vector,'all'); does this work. But octave doesn't support this. How can I do this in octave?
This is my full code. Thanks for yor help.
Hi Please help me with this error: operator +: nonconformant arguments (op1 is 1x17, op2 is 1x18) error: called from Project2 at line 14 column 23
The part of the code is: o_vector(i,j) = input('Please enter the '+num2str(j)+... 'th element of the '+i+'th region output vector: ');
Also if i bypass this error I have another errors, for example in this line: Xn = sum(o_vector,'all'); The debuger says "all" is undefined.
Please help me how can I correct these types of errors when using octave instead of Matlab. Thanks
"all" does not appear to be a recognized option for the sum function  see here:
If you just want to concatenate strings, you could do so with
o_vector(i,j) = input( strcat( 'Please enter the ', num2str(j), 'th element of the ', num2str(i), 'th region output vector: ')
Please always CC the mailing list.
What do you want to do with Xn and ovector? We cannot help unless we know what you are trying to achieve.
You can do that with
Xn = sum(sum(o_vector));
or
Xni = sum(o_vector); Xn = sum(Xni);


Thanks a lot.
I want Xn to be the sum of all elements in o_vector matrix. In Matlab 2018 and newer versions the
Xn = sum(o_vector,'all'); does this work. But octave doesn't support this. How can I do this in octave?
This is my full code. Thanks for yor help.
Hi Please help me with this error: operator +: nonconformant arguments (op1 is 1x17, op2 is 1x18) error: called from Project2 at line 14 column 23
The part of the code is: o_vector(i,j) = input('Please enter the '+num2str(j)+... 'th element of the '+i+'th region output vector: ');
Also if i bypass this error I have another errors, for example in this line: Xn = sum(o_vector,'all'); The debuger says "all" is undefined.
Please help me how can I correct these types of errors when using octave instead of Matlab. Thanks
"all" does not appear to be a recognized option for the sum function  see here:
If you just want to concatenate strings, you could do so with
o_vector(i,j) = input( strcat( 'Please enter the ', num2str(j), 'th element of the ', num2str(i), 'th region output vector: ')
Please always CC the mailing list.
What do you want to do with Xn and ovector? We cannot help unless we know what you are trying to achieve.
You can do that with
Xn = sum(sum(o_vector));
or
Xni = sum(o_vector); Xn = sum(Xni);


Thanks a lot.
I want Xn to be the sum of all elements in o_vector matrix. In Matlab 2018 and newer versions the
Xn = sum(o_vector,'all'); does this work. But octave doesn't support this. How can I do this in octave?
This is my full code. Thanks for yor help.
Hi Please help me with this error: operator +: nonconformant arguments (op1 is 1x17, op2 is 1x18) error: called from Project2 at line 14 column 23
The part of the code is: o_vector(i,j) = input('Please enter the '+num2str(j)+... 'th element of the '+i+'th region output vector: ');
Also if i bypass this error I have another errors, for example in this line: Xn = sum(o_vector,'all'); The debuger says "all" is undefined.
Please help me how can I correct these types of errors when using octave instead of Matlab. Thanks
"all" does not appear to be a recognized option for the sum function  see here:
If you just want to concatenate strings, you could do so with
o_vector(i,j) = input( strcat( 'Please enter the ', num2str(j), 'th element of the ', num2str(i), 'th region output vector: ')
Please always CC the mailing list.
What do you want to do with Xn and ovector? We cannot help unless we know what you are trying to achieve.
You can do that with
Xn = sum(sum(o_vector));
or
Xni = sum(o_vector); Xn = sum(Xni);
You're welcome. "sum" adds all elements over one dimension each time it is called, so to add all elements over 2 dimensions, you can call it twice.


Awesome, thanks!
Can you please help me with these lines too: writecell({'R'},'Output.xlsx','sheet',1,'Range','A1'); writematrix(R,'Output.xlsx','sheet',1,'Range','A2');
writecell({'C'},'Output.xlsx','sheet',2,'Range','A1'); writematrix(C,'Output.xlsx','sheet',2,'Range','A2');
writecell({'LQ'},'Output.xlsx','sheet',3,'Range','A1'); writematrix(LQ,'Output.xlsx','sheet',3,'Range','A2');
writecell({'Region/Section per region'},'Output.xlsx','sheet',4,'Range','A1'); writematrix(o_vector,'Output.xlsx','sheet',4,'Range','A2');
writecell and writematrix don't work in octave and only work in matlab. I want replaces for them in octave. Thanks again.
Thanks a lot.
I want Xn to be the sum of all elements in o_vector matrix. In Matlab 2018 and newer versions the
Xn = sum(o_vector,'all'); does this work. But octave doesn't support this. How can I do this in octave?
This is my full code. Thanks for yor help.
Hi Please help me with this error: operator +: nonconformant arguments (op1 is 1x17, op2 is 1x18) error: called from Project2 at line 14 column 23
The part of the code is: o_vector(i,j) = input('Please enter the '+num2str(j)+... 'th element of the '+i+'th region output vector: ');
Also if i bypass this error I have another errors, for example in this line: Xn = sum(o_vector,'all'); The debuger says "all" is undefined.
Please help me how can I correct these types of errors when using octave instead of Matlab. Thanks
"all" does not appear to be a recognized option for the sum function  see here:
If you just want to concatenate strings, you could do so with
o_vector(i,j) = input( strcat( 'Please enter the ', num2str(j), 'th element of the ', num2str(i), 'th region output vector: ')
Please always CC the mailing list.
What do you want to do with Xn and ovector? We cannot help unless we know what you are trying to achieve.
You can do that with
Xn = sum(sum(o_vector));
or
Xni = sum(o_vector); Xn = sum(Xni);
You're welcome. "sum" adds all elements over one dimension each time it is called, so to add all elements over 2 dimensions, you can call it twice.


Awesome, thanks!
Can you please help me with these lines too: writecell({'R'},'Output.xlsx','sheet',1,'Range','A1'); writematrix(R,'Output.xlsx','sheet',1,'Range','A2');
writecell({'C'},'Output.xlsx','sheet',2,'Range','A1'); writematrix(C,'Output.xlsx','sheet',2,'Range','A2');
writecell({'LQ'},'Output.xlsx','sheet',3,'Range','A1'); writematrix(LQ,'Output.xlsx','sheet',3,'Range','A2');
writecell({'Region/Section per region'},'Output.xlsx','sheet',4,'Range','A1'); writematrix(o_vector,'Output.xlsx','sheet',4,'Range','A2');
writecell and writematrix don't work in octave and only work in matlab. I want replaces for them in octave. Thanks again.
You're welcome. Unfortunately, I've never used the Excel functions, so I will leave that for someone else to answer. In the meantime, here is the documentation on xls functions implemented in Octave in the io package  I hope that helps.

Administrator

Also if i bypass this error I have another errors, for example in this line:
Xn = sum(o_vector,'all'); The debuger says "all" is undefined.
hmmm... looks like matlab's sum added an "all" option in 2018b that hasn't been implemented in Octave yet.
vs
it's the equivalent of sum(A(:)) (sum every element and return a single number output)
probably an easy fix, but it's a compiled function so if a patch is made you'll need to compile it or wait for it to be rolled out with a future version of octave.
for now, you can replace >> sum(o_vector,'all')
with >> sum(o_vector(:))
that will work no matter the size or shape of o_vector.

Administrator

I want Xn to be the sum of all elements in o_vector matrix. In Matlab 2018 and newer versions the
Xn = sum(o_vector,'all'); does this work. But octave doesn't support this. How can I do this in octave?
again, please don't toppost.
for now, you can replace
>> sum(o_vector,'all')
with >> sum(o_vector(:))
that will work no matter the size or shape of o_vector.

