|
From: | Nicholas Jankowski |
Subject: | Re: binary operators not implemented for 'cell' by 'scalar' operations |
Date: | Tue, 24 Nov 2015 07:01:47 -0500 |
This would mean that it is not yet possible to plot contents of a cell but those of a matrix, this is just something that confused me.On 24 November 2015 at 10:13, karl <address@hidden> wrote:Am 24.11.2015 um 10:03 schrieb Jonathan Camilleri:
I tried this:
Read http://www.octave.org/bugs.html to learn how to submit bug reports.For information about changes from previous versions, type 'news'.
>> m1 = {1 1; 2 4; 4 8; 3 6}m1 ={[1,1] = 1[2,1] = 2[3,1] = 4[4,1] = 3[1,2] = 1[2,2] = 4[3,2] = 8[4,2] = 6}>> m2 = m1.^0.2error: binary operator '.^' not implemented for 'cell' by 'scalar' operations>> cell2mat(m2)error: 'm2' undefined near line 1 column 10error: evaluating argument list element number 1>>
On 24 November 2015 at 10:00, Marco Atzeri <address@hidden> wrote:
On 24/11/2015 09:56, Jonathan Camilleri wrote:
I thought I could do matrix multiplications and the mathematical> >> m2 = m1.*0.2
operators, but evidently I cannot.
See
https://en.wikipedia.org/wiki/Operation_(mathematics)
https://en.wikipedia.org/wiki/Algebra
https://en.wikipedia.org/wiki/Order_of_operations
m1 = {1 1; 2 4; 4 8; 3 6}
m1 =
{
[1,1] = 1
[2,1] = 2
[3,1] = 4
[4,1] = 3
[1,2] = 1
[2,2] = 4
[3,2] = 8
[4,2] = 6
}
> error: binary operator '.*' not implemented for 'cell' by 'scalar'
m1 is not a Matrix.
May be you were looking for
octave:1> m1 = [1 1; 2 4; 4 8; 3 6]
m1 =
1 1
2 4
4 8
3 6
octave:2> m2 = m1.*0.2
m2 =
0.20000 0.20000
0.40000 0.80000
0.80000 1.60000
0.60000 1.20000
_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave
--
Jonathan Camilleri
Mobile (MT): ++356 7982 7113
E-mail: address@hidden
Please consider your environmental responsibility before printing this e-mail.
I usually reply to emails within 2 business days. If it's urgent, give me a call.
and, angel start-up investment opportunities available at http://slyth3.wix.com/jon-business.Vision Engineering https://www.facebook.com/pages/Vision-Engineering-Operations/694816873919304?ref=hlOnline resume is available online at http://mt.linkedin.com/in/jonathancamilleri and shared bookmarks at https://delicious.com/jon80.Doing business in Malta - https://www.gov.mt/en/About%20Malta/Doing%20Business%20in%20Malta/Pages/Doing-Business-in-Malta.aspx, presented by the Government of Malta.http://www.ccmalta.com/doing-business-in-malta/, presented by CC Advocates.http://www.kpmg.com/MT/en/IssuesAndInsights/Doing%20Business%20in%20Malta/Documents/KPMG%20Tax%20Report.pdf, prepared by KPMG.
_______________________________________________ Help-octave mailing list Help -address@hidden https://lists.gnu.org/mailman/listinfo/help-octave
{1 1; 2 4; 4 8; 3 6} is not the same as [1 1; 2 4; 4 8; 3 6]. For the difference see the Octave manual "cell array" and "matrix".
_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave
--Jonathan Camilleri
[Prev in Thread] | Current Thread | [Next in Thread] |