Question about Computers & Internet

1 Answer

Programs with variable number of arguments

Write a function that receives variable number of arguments, where the arguments are the coordinates of a point .based on the nomber of arguments received,the function should display type of shape like a point,line,triangle,etc.that can be drawn.

Posted by on

1 Answer

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    Superstar:

    An expert that got 20 achievements.

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

  • Master
  • 19,396 Answers

To start points and lines are not shapes, and a triangle is not representable with a single function, therefore you need a function to draw shapes , given a number of points as parameters, and one to draw math functions (lines etc.).

Here is an example: Draw Line, Ellipse, Polygon ...

From website above, here is script in JS:

"<script type="text/javascript">
<!--
function myDrawFunction()
{
jg_doc.setColor("#00ff00"); // green
jg_doc.fillEllipse(100, 200, 100, 180); // co-ordinates related to the document
jg_doc.setColor("maroon");
jg_doc.drawPolyline(new Array(50, 10, 120), new Array(10, 50, 70));
jg_doc.paint(); // draws, in this case, directly into the document

jg.setColor("#ff0000"); // red
jg.drawLine(10, 113, 220, 55); // co-ordinates related to "myCanvas"
jg.setColor("#0000ff"); // blue
jg.fillRect(110, 120, 30, 60);
jg.paint();

jg2.setColor("#0000ff"); // blue
jg2.drawEllipse(10, 50, 30, 100);
jg2.drawRect(400, 10, 100, 50);
jg2.paint();
}

var jg_doc = new jsGraphics(); // draw directly into document
var jg = new jsGraphics("myCanvas");
var jg2 = new jsGraphics("anotherCanvas");

myDrawFunction();

//-->
</script>"

Posted on Oct 27, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

When I try to graph it says argument error


Your function is not correctly defined. If graph is function y=f(x), variable must be x; if graph is polar, variable must be theta, and if graph is parametric, variable must be t. This does not cover all possible cases. Check the graph type and the definition of the function.

Mar 16, 2015 | Casio FX-9750GII Graphing Calculator

1 Answer

My MS Excel vlookup function ASCII type table contains both upper case and lower case letters, characters like ( and % or *, and numbers. It seems to return the numerical equivalent of upper case letters...


Correct a #N/A error blueup_clv.gifShow All bluedrop_clv.gifHide All This error occurs when a value is not available to a function or formula.
  1. Optionally, click the cell that displays the error, click the button that appears ooui1_za06043871.gif, and then click Show Calculation Steps if it appears.
  2. Review the following possible causes and solutions. blueup_clv.gifMissing data, and #N/A or NA() has been entered in its place
    Replace #N/A with new data.
    Note You can enter #N/A in those cells where data is not yet available. Formulas that refer to those cells will then return #N/A instead of attempting to calculate a value.
    blueup_clv.gifGiving an inappropriate value for the lookup_value argument in the HLOOKUP, LOOKUP, MATCH, or VLOOKUP worksheet function
    Make sure that the lookup_value argument (argument: The values that a function uses to perform operations or calculations. The type of argument a function uses is specific to the function. Common arguments that are used within functions include numbers, text, cell references, and names.) is the correct type of value — for example, a value or a cell reference, but not a range reference. blueup_clv.gifUsing the VLOOKUP, HLOOKUP, or MATCH worksheet function to locate a value in an unsorted table
    By default, functions that look up information in tables must be sorted in ascending order. However, the VLOOKUP and HLOOKUP worksheet functions contain a range_lookup argument (argument: The values that a function uses to perform operations or calculations. The type of argument a function uses is specific to the function. Common arguments that are used within functions include numbers, text, cell references, and names.) that instructs the function to find an exact match even if the table is not sorted. To find an exact match, set the range_lookup argument to FALSE. The MATCH worksheet function contains a match_type argument that specifies the order the list must be sorted in to find a match. If the function cannot find a match, try changing the match_type argument. To find an exact match, set the match_type argument to 0.
    blueup_clv.gifUsing an argument in an array formula that is not the same number of rows or columns as the range that contains the array formula
    If the array formula (array formula: A formula that performs multiple calculations on one or more sets of values, and then returns either a single result or multiple results. Array formulas are enclosed between braces { } and are entered by pressing CTRL+SHIFT+ENTER.) has been entered into multiple cells, make sure that the ranges referenced by the formula have the same number of rows and columns, or enter the array formula into fewer cells. For example, if the array formula has been entered into a range 15 rows high (C1:C15) and the formula refers to a range 10 rows high (A1:A10), the range C11:C15 will display #N/A. To correct this error, enter the formula into a smaller range (for example, C1:C10), or change the range to which the formula refers to the same number of rows (for example, A1:A15).
    blueup_clv.gifOmitting one or more required arguments from a built-in or custom worksheet function
    Enter all arguments (argument: The values that a function uses to perform operations or calculations. The type of argument a function uses is specific to the function. Common arguments that are used within functions include numbers, text, cell references, and names.) in the function.
    blueup_clv.gifUsing a custom worksheet function that is not available
    Make sure that the workbook that contains the worksheet function is open and the function is working properly.
    blueup_clv.gifRunning a macro that enters a function that returns #N/A
    Make sure that the arguments (argument: The values that a function uses to perform operations or calculations. The type of argument a function uses is specific to the function. Common arguments that are used within functions include numbers, text, cell references, and names.) in the function are correct and in the correct position.

Oct 31, 2008 | Computers & Internet

1 Answer

What is a parameter


In computer programming, a parameter is a special kind of variable, used in a subroutine to refer to one of the pieces of data provided as input to the subroutine.[1] These pieces of data are called arguments. An ordered list of parameters is usually included in the definition of a subroutine, so that, each time the subroutine is called, its arguments for that call can be assigned to the corresponding parameters.
Just as in standard mathematical usage, the argument is thus the actual value passed to a function, procedure, or routine (such as 37 in log(37)), whereas the parameter is a reference to that value inside the implementation of the function (log in this case). See the Parameters and arguments section for more information.
In the most common case, call by value, a parameter acts within the subroutine as a local (isolated) copy of the argument, but in other cases, e.g. call by reference, the argument supplied by the caller can be affected by actions within the called subroutine (as discussed in evaluation strategy).
The semantics for how parameters can be declared and how the arguments get passed to the parameters of subroutines are defined by the language, but the details of how this is represented in any particular computer system depend on the calling conventions of that system.

Feb 09, 2014 | Computers & Internet

1 Answer

Argument checking!


The calculator does have several error message concerning the argument. For the Request( command the syntax is
Request(Message, VarName)
What you type is stored as a string. It is only after you try to convert it to a value that the calculator looks at its content.
Here is an example where the variable VarName is x
Request ("Variable x", x)
I enter a complex number, manipulate it mildly with no apparent problem. However when I try to convert it to a numerical expression, and store it in the variable x, y, theta, I get a message Error non-real result.
8c34d722-dbfe-4986-87f4-909da5e8317e.png

Jan 13, 2014 | Texas Instruments Voyage 200 Calculator

1 Answer

What is undefined string


I suspect you got this error during the compilation or execution of a program. If that is not the case, disregard what I am rambling on about .
A string is a set of printing characters (letters, numbers, punctuation signs). In some programming languages a string variable can be defined. Once you define a variable as a string, you can store a string in it.
Depending on the language the string must be enclosed between quotation marks or some other separators. As for other variables, string variables have to be defined before they can be called.
Go to the location where the error occurred and check your inputs, arguments you feed to functions, etc.

Dec 30, 2013 | Canon Office Equipment & Supplies

1 Answer

Polar rectangular


There is nothing to convert, because if T is a real number so is 40sin(4000T).
40sin(4000T)=40abs(sin(4000T))*sign(sin(4000T))
where abs() is the absolute value of it argument, and sign(sin(4000T)) is positive or negative.
So in (radius, angle) polar coordinates
r= 40 abs(sin(4000T)),
theta =(0, or PI), depending on sign(sin(4000T))

If you are trying to graph parametric functions, this calculator does not do graphs, and you need another function of T

Dec 26, 2013 | Casio FX991ES Scientific Calculator

1 Answer

Hey I am trying to use the DeSolve funtion on Texas TI-nspire cas. I insert: DeSolve(2x=0, x) and I get a error message. What am i doing wrong


deSolve( ) solves differential equations. The general syntax is deSolve(1stOR2ndOrderODE, Var, depVar). The first argument must be a first order or second order differential equation, the second argument is the independent variable, and the third is the dependent variable (the name of the function you are trying to obtain.)
Your command does not have a differential equation, and it does not have the dependent variable.

Sep 18, 2011 | Texas Instruments TI-89 Calculator

1 Answer

How do I put a limit in my TI-89 with it saying 'to few arguments'?


Make sure you give it the appropriate number of arguments. The limit() function takes three or four arguments.
  1. The expression. For example, sin(x)/x
  2. The variable. For example, x
  3. The point at which the limit is to be taken. For example, 0
  4. (optional) The direction from which the limit is to be approached, negative for from the left, positive for from the right, 0 for both. Defaults to zero if not given.

Sep 08, 2010 | Texas Instruments TI-89 Calculator

1 Answer

How do i do difference quotient on my ti 89?


The function avgRC( calculates forward-difference quotients and the nDeriv( calculates central-difference quotients. Take your pick. You can also use the d( differentiate function.
You can also create a small program or function that gets a function as argument, along with the variable and the step and returns one of the difference quotients. (central, forward, or backward).

Jul 19, 2010 | Texas Instruments TI-89 Calculator

1 Answer

Just bought this Ti-89 and I can't graph a Diff Eq. I followed the directions from the manual on page 69 and get an error: undefined variable


Even though implied multiplication is accepted generally by the calculator when it involves a number and variable, it leads to errors when it involves two sybmols,
xsin(x) is interpreted as a function called XSIN not X*SIN(X).
Suppose you have a function y1, function of t and you write ty1 the calculator will generate an undefined variable error: It reads ty1 as a variable.To prevent the error message you should write t*y1, showing the multiplication explicitly.
Similarly if you write y1'=0.001y1(100-t) the expression y1(100-t) is interpreted as a function call: the function y1 is called with argument 100-t. If it is what you want you should explicitly express the multiplication and wrtite y1'=0.001y1*(100-t).

Feb 01, 2010 | Texas Instruments TI-89 Calculator

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

118 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

100304 Answers

David Payne
David Payne

Level 3 Expert

14160 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...