bugGNU Octave - Bugs: bug #43614, Plotting of a Nested Function Fails

 
 

bug #43614: Plotting of a Nested Function Fails

Submitted by:  Martin Vahi <martin_vahi>
Submitted on:  Fri 14 Nov 2014 07:11:52 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.6.2Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 14 Nov 2014 07:49:39 PM UTC, comment #4:

This is not a bug in octave but in your script as Matthias already explained. You are trying to do a matrix multiplication (a single star symbol) on 2 equal vectors. Try "x*x" and you'll get the same error message. We think you want an element-by-element multiplication:

See https://www.gnu.org/software/octave/doc/interpreter/Simple-Examples.html#Elementary-Calculations and https://www.gnu.org/software/octave/doc/interpreter/Arithmetic-Ops.html#Arithmetic-Ops

Closing as invalid.

Andreas Weber <andy1978>
Project Member
Fri 14 Nov 2014 07:47:58 PM UTC, comment #3:

Is this what you want?

plot(x,sin(x)+sin(x.4.sin(x)));

Doug Stewart <dastew>
Fri 14 Nov 2014 07:41:03 PM UTC, comment #2:

sorry, it has to be
or even

Matthias Jüschke <maju>
Fri 14 Nov 2014 07:38:17 PM UTC, comment #1:

x is a vector. If you multiply a vector with another vector, the dimensions must fit. Because they don't fit, the error message is displayed.
You want to multiply each element of one vector with the corresponding element of the other vector. So you have to insert a dot in front of the operator '*' and write

Matthias Jüschke <maju>
Fri 14 Nov 2014 07:11:52 PM UTC, original submission:

The plotting of

y=sin(x)+sin(x + 4 * sin(x))

works and the plotting of

y=sin(x)+sin(x Y 4 Y sin(x))

where the Y is the star symbol, "*", fails.

To avoid flawtrack markup related distortions, the console output resides in a separate file called "2014_11_14_octave_plotting_flaw.txt".

Martin Vahi <martin_vahi>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by andy1978 (Posted a comment)
  • -unavailable- added by dastew (Posted a comment)
  • -unavailable- added by maju (Posted a comment)
  • -unavailable- added by martin_vahi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 14 Nov 2014 08:07:49 PM UTCandy1978Open/ClosedOpen=>Closed
    Fri 14 Nov 2014 07:49:39 PM UTCandy1978StatusNone=>Invalid
    Fri 14 Nov 2014 07:11:52 PM UTCmartin_vahiAttached File-=>Added 2014_11_14_octave_plotting_flaw.txt, #32437

    Back to the top


    Powered by Savane 3.1-cleanup1