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
Kruka [31]
3 years ago
9

Write a script that will read from a file x and y data points in thefollowing format:

Computers and Technology
1 answer:
worty [1.4K]3 years ago
8 0

Answer /Explanation

load hw92.dat

FID = fopen(file, 'r');

if FID == -1  

   fprintf('ERROR CANNOT OPEN FILE TO READ!');  

else

   fclose(file);

The we have:

datacell = textscan(FID, 'x%fy%f', 'CollectData', 1);

xycoords = datacell{1};

x 0 y 1

x 1.3 y 2.2

x 2.2 y 6

x 3.4 y 7.4

x 4.2 y 5.5

x 4.4 y 4.5

x 6.2 y 7.8

x 7.7 y 11.1

x 8.2 y 11.5

x 9.9 y 15.2

x 7.2 y 9.5

x 8.9 y 12.5

end

You might be interested in
When you declare an array, _____________________ You always reserve memory for it in the same statement You might reserve memory
Kisachek [45]

Answer:

the ability to reserve memory for it in the same statement  depends on the type of the array.

Explanation:

When you declare an array, the ability to reserve memory for it in the same statement  depends on the type of the array.

4 0
3 years ago
Suppose you are developing a data visualization application DataViz which calls some functions from a statistics library class S
Nadusha1986 [10]

Answer:

By using dependency injection, create the adapter to adapt both the DataViz and the UberStats interface as expected.

Explanation:

Adapters are used in Objected-oriented programming to run or convert the output of one class object to another. The DataViz class currently uses the SuperStats class as an adaptee to get and output statistical results.

Write a new code from the scratch is tedious, so, the UberStats class dependencies are injected in the adapter and the DataViz and UberStats class functionalities can be experimented with.

4 0
2 years ago
18 Select the correct answer.
Elden [556K]

A string for sure, so answer B.

6 0
2 years ago
Which device is responsible for converting the main electric supply into usable voltage levels inside a computer?
Tom [10]
The PSU or most commonly known as the Power Supply.
7 0
2 years ago
Read 2 more answers
Create a function (prob3_6) that will do the following: Input a positive scalar integer x. If x is odd, multiply it by 3 and add
aniked [119]

Answer:

Following are the program in python language

def prob3_6(k): #function definition

  c = 0 #variable declaration

  while k != 1: #iterating the while loop

      print(k) #print k

      if k % 2 == 0:#check if condition  

          k= k // 2 #divisible by 2

      else: #else condition

          k = k * 3 + 1  

      c = c + 1

  print(k) #print k

  print c #print count

prob3_6(3)#function call

Output:

3

10

5

16

8

4

2

1

7

Explanation:

Following are the description of program

  • Create a function "prob3_6" in this function we passing an integer parameter of type "int" named "k".
  • Inside that function we declared a variable "c" of type "int" that is used for counting purpose .
  • After that we iterated the while for print the value of when it is not equal to 1 .
  • We check if condition when k gives 0 on modulus then k is divisible by 2 otherwise else block will be executed in the else part we multiply by 3 to k and add 1 to the k variable .
  • Finally print "k" and "c"

5 0
3 years ago
Other questions:
  • This is a text message that is stored on a user's computer by a Web server that helps trace the user's browsing habits. a. Scrip
    14·1 answer
  • Biomimicry is the term used when engineers are inspired by objects found in nature? Group of answer choices True False
    10·1 answer
  • The IBM nine-track tapes that became the industry standard for storage for three decades had several sizes , the most common bei
    13·1 answer
  • 9.19 LAB: Words in a range (lists) Write a program that first reads in the name of an input file, followed by two strings repres
    6·1 answer
  • Which of the following parameters is optional sample(a,b,c,d=7
    9·1 answer
  • A slide titled Alexander Graham Bell. There are 6 bulleted entries on the slide, and there is a lot of text on the slide. There
    11·2 answers
  • List any three positive impact of a computer​
    9·1 answer
  • Does any of yall play rob lox?
    5·2 answers
  • Which of the following is the most significant result of technological innovation?
    10·2 answers
  • The second generation of computer languages is a higher-level language than
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!