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
lys-0071 [83]
2 years ago
8

What is the Matlab command to create a column vector with 11 equally spaced elements, whose first element is 2 and whose last is

32.
Computers and Technology
1 answer:
Ray Of Light [21]2 years ago
6 0

Answer:

transpose(linspace(2,32,11))

Explanation:

<em>To get the equally spaced elements you can use:</em>

<em>linspace</em> is the command for generating a linearly spaced vector.

For instance, the command:

<em>linspace</em>(element1,element2,n)

generates n points, between element1 and element2

The spacing between the points is calculated by

\frac{element2-element1}{n-1}

In your case, the <em>linspace</em> command will create a vector with 1 row and 11 columns (1x11).

To get the column vector:

In order to convert this vector into one with 11 rows and 1 column (11x1), you can use:

<em>tanspose</em>(vector)

where vector is <em>linspace</em>(element1,element2,n)

You might be interested in
Banking Account
satela [25.4K]

Answer:

Here is the Python script solution.

Explanation:

#!/usr/bin/python

"""Types of bank accounts"""

# Assignment:

# Bank Account Manager - Create a class called Account which will be an abstract

# class for three other classes called CheckingAccount, SavingsAccount and

# BusinessAccount. Manage credits and debits from these accounts through an ATM

# style program.

from __future__ import print_function

def pct_to_dec(num):

"""Returns decimal version of percent"""

dec = float(num) / 100

return dec

class Account(object):

"""Creates an Account"""

def __init__(self, balance, int_rate, act_type, min_balance, **kwargs):

self.balance = balance

self.int_rate = int_rate

self.act_type = act_type

self.min_balance = min_balance

super(Account, self).__init__(**kwargs)

def __str__(self):

"""Returns formatted account type and balance"""

# Charge $25 fee if balance drops below minimum

if self.balance < self.min_balance:

self.balance -= 25

# Add interest

self.balance += round(self.balance * pct_to_dec(self.int_rate), 2)

return '{0}: ${1}'.format(self.act_type, self.balance)

class CheckingAccount(Account):

"""Creates a CheckingAccount Account"""

def __init__(self, **kwargs):

super(CheckingAccount, self).__init__(**kwargs)

class SavingsAccount(Account):

"""Creates a SavingsAccount Account"""

def __init__(self, **kwargs):

super(SavingsAccount, self).__init__(**kwargs)

class BusinessAccount(Account):

"""Creates a BusinessAccount Account"""

def __init__(self, **kwargs):

super(BusinessAccount, self).__init__(**kwargs)

# pylint: disable=C0103

ca1 = CheckingAccount(balance=500, int_rate=0.25, act_type='Checking Account',

min_balance=0)

sa1 = SavingsAccount(balance=50, int_rate=0.50, act_type='Savings Account',

min_balance=0)

ba1 = BusinessAccount(balance=4000, int_rate=0.75, act_type='Business Account',

min_balance=5000)

# Month #1 statement, initial deposits plus interest

print(ca1)

print(sa1)

print(ba1)

print('-------------')

# Month #2 statement plus interest

# Make deposit into checking

setattr(ca1, 'balance', (ca1.balance + 1000))

# Withdraw from checking

setattr(ca1, 'balance', (ca1.balance - 500))

# Make a deposit into savings

setattr(sa1, 'balance', (sa1.balance + 100))

print(ca1)

print(sa1)

print(ba1)

print('-------------')

# Month #3 statement plus interest

# Make deposit into checking

setattr(ca1, 'balance', (ca1.balance + 2500))

# Withdraw from checking

setattr(ca1, 'balance', (ca1.balance - 700))

# Make a deposit into savings

setattr(sa1, 'balance', (sa1.balance + 100))

# Make a deposit into business

setattr(ba1, 'balance', (ba1.balance + 1000))

print(ca1)

print(sa1)

print(ba1)

4 0
3 years ago
While the Internet can be a great resource, the information is not always reliable, as anyone can post information. Select one:
Olin [163]

Answer: True

Explanation: Because anyone can post something and it can be non reliable

7 0
3 years ago
PLEASE HELP I'M TAKING A QUIZ AND I HAVE 5 MINUTES LEFT
larisa [96]

Answer:

pp popo

Explanation:

6 0
3 years ago
Read 2 more answers
Which access database object asks a question about the data stored in a database and displays specific fields and records that a
elena-14-01-66 [18.8K]
The Query object is used to asks a question about the data stored in a database and displays the specific fields and records that answer the question.

In code form, the select command is used for queries. 
6 0
3 years ago
Can someone please help i have no idea what’s going on in this code
Valentin [98]

Explanation:

The first 3 lines of code tell the user to input a 5 digit number (ex. 72,910) or a 1 digit number (ex. 3). The next 5 lines of code determine if it is a 5/1 digit number or not. If it is, it prints "Success!". The rest of the code just tells that if it's not a 5/1 digit number, and if it's not, it gives errors and tells the user to try again.

Hope this helps!

3 0
2 years ago
Other questions:
  • What are the pros and cons of editorial anonymity in Wikipedia
    10·2 answers
  • This program will read integers from a file and find results from these integers. Open the file, test to make sure the file open
    12·1 answer
  • Sulfur content is measured in
    11·1 answer
  • 3. Find the product of (a² +3a+5) x (a+7)​
    7·1 answer
  • How many binary digits does a single hexadecimal digit represent?
    13·1 answer
  • Write a function named last_digit that returns the last digit of an integer. For example, last_digit(3572) should return 2. It s
    5·1 answer
  • What feature is available to add a suggestion in the margin of someone else's document?​
    15·1 answer
  • A list is sorted in ascending order if it is empty or each item except the last one is less than or equal to its successor.
    14·1 answer
  • I need help about computer program. Solve C language code...... please​
    7·1 answer
  • What do we call the software which programmers use to program?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!