1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Feliz [49]
3 years ago
14

Write a function (euclid point1 point2) that accepts two parameters, each being a list containing exactly two numbers that defin

e a two-dimensional point. Return the Euclidean distance between the two points. Use cond to check for the proper input (lists that contain exactly two numbers). If the input is improper, return
Engineering
1 answer:
Mazyrski [523]3 years ago
4 0

Answer:

Explanation:

Solution:

-The task is more likely to compute the distance of n-dimensional vectors, i.e.

sqrt((x1-y1)^2 + ... + (xn-yn)^2).

- With a recursive version, I consider that p and q are two mathematical vectors, so that p contains different coordinates (p1, ..., pn), which differs from your implementation where p contains all x's and q all y's.

- So, you have to compute (pi - qi)^2 for each for pair (pi, qi) of elements taken in parallel from p and q, sum the intermediate values and take the square root.

- The function would be as follows:

 " (defun euclidean-distance-it (p q)

      (destructuring-bind (x1 x2) p

          (destructuring-bind (y1 y2) q

               (sqrt (+ (expt (- x1 y1) 2)

                       (expt (- x2 y2) 2)))))) "

- With high-order functions, you don't even need to use recursion. The function would be:

     "  (defun distance (p q)  

                 (sqrt

                    (reduce #'+  

                       (map 'list

                           (lambda (px qx) (expt (- px qx) 2))  

                            p q)))) "

You might be interested in
MATLAB can solve a variety of engineering problems including those requiring simulating differential equations and iterative num
frez [133]

Answer:

A. True

Explanation:

MATLAB may be defined as a programming platform that is designed specifically for the engineers as well as the scientists to carry out different analysis and researches.

MATLAB makes use of a desktop environment which is tuned for certain iterative analysis and the design processes with a programming language which expresses matrix as well as array mathematics directly.

Thus the answer is true.

3 0
3 years ago
Extra points!!!!! <br><br> List the general types of housing<br> (Example: condo)
Nadusha1986 [10]

Answer:

co-op, apartment, townhome, manor etc

6 0
3 years ago
Read 2 more answers
The function f determines the cost (in dollars) of a new Honda Accord in terms of the number of years t since 2000. That is, f (
lutik1710 [3]

Answer:

f(5)

Explanation:

Function notation  is  a precise way of giving information about a function without need for a lengthy written explanation. The most common function notation is f (x) which is interpreted as "f of x".

For the year 2005,

t = 2005 -2000

= 5

Using the function notation to represent the cost (in dollars) of a new Accord in 2005 is f(5)

7 0
4 years ago
Read 2 more answers
PROBLEM IN PICTURE HELP ME DEAR GODDDDDD UGHHH NONONO I HAVE 2 MINUTES TO FINISH THIS ❕❗️❕❗️❗️❕❕❕❕❗️❕❕❗️❕❗️❗️❗️❕‼️‼️‼️‼️❗️‼️❗️
Elan Coil [88]
Thx :) so much :))))))
4 0
3 years ago
Read 2 more answers
Smoke rises from a chimney on a day with variable winds and produces a visible pattern. Does this pattern represent a pathline o
jeyben [28]

Answer:

Pathline

Explanation:

- The smoke coming out of the chimney on a day with variable winds would most closely relate to a path-line. Consider a smoke particle " grey " color particle that is injected into air at every instant in time and follows a continuous "path" along the flow of the of the fluid.

- A streakline concentrates on fluid particles that have gone through a fixed station or point. At some instant of time the position of all these particles are marked and a line is drawn through them.

- The streakline and pathline can coincide on the conditions of flow to be steady that is the rate of change of flow of the air is continuous and does not change with time in a day i.e the variation in the winds or any discontinuity is removed.

5 0
4 years ago
Other questions:
  • A well-insulated, rigid tank, having a volume of 2 m3 , contains saturated water vapor at 120 ◦C. The water is stirred until the
    13·1 answer
  • The popularity of orange juice, especially as a breakfast drink, makes it an important factor in the economy of orange-growing r
    14·1 answer
  • Which professional draws maps and plans for projects involving structures other than buildings, such as bridges?
    13·2 answers
  • 7. With the instruments located on the high-voltage side and with the low-voltage side short-circuited, the short-circuit test r
    13·2 answers
  • For methyl chloride at 100°C the second and third virial coefficients are: B = −242.5 cm 3 ·mol −1 C = 25,200 cm 6 ·mol −2 Calcu
    7·1 answer
  • An insulated 40 ft^3 rigid tank contains air at 50 psia and 580°R. A valve connected to the tank is now opened, and air is allow
    10·1 answer
  • How is varnished timber shaped and cut?
    11·1 answer
  • The hydrofoil boat has an A-36 steel propeller shaft that is 100 ft long. It is connected to an in-line diesel engine that deliv
    8·1 answer
  • I think it’s a wedge. Am I right?
    8·2 answers
  • Ur are mean bryce lolololololololollolollolololol
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!