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
mario62 [17]
3 years ago
10

In matlab how would this specific code be written and how could I ask the user to enter a vector of coefficients for the polynom

ial model. Verify that the entry has an even number of elements (an odd number of elements would mean an even order polynomial). If an invalid vector is entered, prompt the user to re-enter the vector until an acceptable vector is entered. If the user does not enter an acceptable vector after 5 attempts (including the first prompt), display a warning and remove the last element of the last vector entered. (For example, if the last user input is [1 2 3 4 5], the vector becomes [1 2 3 4]).
my code
[1,2,3,4];
Computers and Technology
1 answer:
solniwko [45]3 years ago
7 0

Answer:

Explanation:

that is correct 1234

You might be interested in
How to make your nest learning thermostat stop doing something
k0ka [10]

Answer:

You could unplug it? LOL

and get a different thermostat.

Explanation:

Could you mark this answer as brainiest?

Thanks! :)

4 0
3 years ago
Write a procedure named Str_find that searches for the first matching occurrence of a source string inside a target string and r
kirill115 [55]

Answer: Provided in the explanation section

Explanation:

Str_find PROTO, pTarget:PTR BYTE, pSource:PTR BYTE

.data

target BYTE "01ABAAAAAABABCC45ABC9012",0

source BYTE "AAABA",0

str1 BYTE "Source string found at position ",0

str2 BYTE " in Target string (counting from zero).",0Ah,0Ah,0Dh,0

str3 BYTE "Unable to find Source string in Target string.",0Ah,0Ah,0Dh,0

stop DWORD ?

lenTarget DWORD ?

lenSource DWORD ?

position DWORD ?

.code

main PROC

  INVOKE Str_find,ADDR target, ADDR source

  mov position,eax

  jz wasfound           ; ZF=1 indicates string found

  mov edx,OFFSET str3   ; string not found

  call WriteString

  jmp   quit

wasfound:                   ; display message

  mov edx,OFFSET str1

  call WriteString

  mov eax,position       ; write position value

  call WriteDec

  mov edx,OFFSET str2

  call WriteString

quit:

  exit

main ENDP

;--------------------------------------------------------

Str_find PROC, pTarget:PTR BYTE, ;PTR to Target string

pSource:PTR BYTE ;PTR to Source string

;

; Searches for the first matching occurrence of a source

; string inside a target string.

; Receives: pointer to the source string and a pointer

;    to the target string.

; Returns: If a match is found, ZF=1 and EAX points to

; the offset of the match in the target string.

; IF ZF=0, no match was found.

;--------------------------------------------------------

  INVOKE Str_length,pTarget   ; get length of target

  mov lenTarget,eax

  INVOKE Str_length,pSource   ; get length of source

  mov lenSource,eax

  mov edi,OFFSET target       ; point to target

  mov esi,OFFSET source       ; point to source

; Compute place in target to stop search

  mov eax,edi    ; stop = (offset target)

  add eax,lenTarget    ; + (length of target)

  sub eax,lenSource    ; - (length of source)

  inc eax    ; + 1

  mov stop,eax           ; save the stopping position

; Compare source string to current target

  cld

  mov ecx,lenSource    ; length of source string

L1:

  pushad

  repe cmpsb           ; compare all bytes

  popad

  je found           ; if found, exit now

  inc edi               ; move to next target position

  cmp edi,stop           ; has EDI reached stop position?

  jae notfound           ; yes: exit

  jmp L1               ; not: continue loop

notfound:                   ; string not found

  or eax,1           ; ZF=0 indicates failure

  jmp done

found:                   ; string found

  mov eax,edi           ; compute position in target of find

  sub eax,pTarget

  cmp eax,eax    ; ZF=1 indicates success

done:

  ret

Str_find ENDP

END main

cheers i hoped this helped !!

6 0
3 years ago
if a person walks 10 metres due to south in 10 seconds 10 due east in the next 10 seconds and transmitted you're not in the next
Scorpion4ik [409]

Answer:

\frac{1}{3}\ m/s

Explanation:

The computation of the velocity by using the following formula is

As we know that

Velocity = \frac{Displacement}{Total\ time\ taken}

where,

Displacement is 10 meters

Total time taken is 30 seconds

Now placing these values to the above formula

So, the velocity of Dash is

= \frac{10\ meters}{30\ seconds}

= \frac{1}{3}\ m/s

We simply applied the above formula so that we can get the velocity and the same is to be considered

5 0
2 years ago
The price elasticity of demand for mobile phones a. will be higher if there is an improvement in the production technology. b. w
rodikova [14]

Answer:

b. will be lower if consumers perceive mobile phones to be a necessity.

Explanation:

The price elasticity of demand is described as the percentage variation in the demanded quantity of service or goods divided by the change in the percentage of the price. And henceforth it describes the responsiveness of the demanded quantity to a price change. And now if the mobile phones are thought of as being the necessity then the price will increase as demand will increase, and hence the price elasticity of demand will be lower. And if there is an improvement in the production technology then the price will be lowered, and hence price elasticity of demand will be less as the change in the percentage of the price will be negative. And the exact definition of it as we have described above. Hence, b is correct options.

3 0
2 years ago
Integers and booleans. Write a program RightTriangle that takes three int command-line arguments and determines whether they con
icang [17]

Answer:

<em>The programming language is not stated;</em>

<em>I'll answer using C++</em>

#include<iostream>

#include<cmath>

using namespace std;

int main()

{

int side1, side2, side3;

cout<<"Enter the three sides of the triangle: "<<endl;

cin>>side1>>side2>>side3;

if(side1<=0 || side2 <= 0 || side3 <= 0) {

 cout<<"Invalid Inputs";

}

else {

 if(abs(pow(side1,2) - (pow(side2,2) + pow(side3, 2)))<0.001) {

  cout<<"Right Angled";

 }

 else if(abs(pow(side2,2) - (pow(side1,2) + pow(side3, 2)))<0.001) {

  cout<<"Right Angled";

 }

 else if(abs(pow(side3,2) - (pow(side2,2) + pow(side1, 2)))<0.001) {

  cout<<"Right Angled";

 }

 else {

  cout<<"Not Right Angled";

 }

}

return 0;

}

Explanation:

The following line declares the three variables

int side1, side2, side3;

The next line prompts user for input of the three sides

cout<<"Enter the three sides of the triangle: "<<endl;

The next line gets user input

cin>>side1>>side2>>side3;

The following if condition checks if any of user input is negative or 0

<em> if(side1<=0 || side2 <= 0 || side3 <= 0) { </em>

<em>  cout<<"Invalid Inputs"; </em>

<em> } </em>

If otherwise

else {

The following if condition assumes that side1 is the largest and test using Pythagoras Theorem

<em>if(abs(pow(side1,2) - (pow(side2,2) + pow(side3, 2)))<0.001) { </em>

<em>   cout<<"Right Angled"; </em>

<em>  } </em>

The following if condition assumes that side2 is the largest and test using Pythagoras Theorem

<em>  else if(abs(pow(side2,2) - (pow(side1,2) + pow(side3, 2)))<0.001) { </em>

<em>   cout<<"Right Angled"; </em>

<em>  } </em>

The following if condition assumes that side3 is the largest and test using Pythagoras Theorem

<em>  else if(abs(pow(side3,2) - (pow(side2,2) + pow(side1, 2)))<0.001) { </em>

<em>   cout<<"Right Angled"; </em>

<em>  } </em>

If none of the above conditions is true, then the triangle is not a right angles triangle

<em>  else { </em>

<em>   cout<<"Not Right Angled"; </em>

<em>  } </em>

}

return 0;

Download cpp
4 0
3 years ago
Other questions:
  • Given two ArrayLists of sorted strings (alphabetically ascending), write down a method to merge these sorted strings’ ArrayLists
    10·1 answer
  • Which one of the following is an example of hacktivism according to you and why?
    11·1 answer
  • Is using abbreviations and symbols in social media a problem? Why or why not?
    11·1 answer
  • Team A found 342 errors during the software engineering process prior to release. Team B found 184 errors. What additional measu
    12·1 answer
  • What does a spam e-mail normally promise you?
    9·1 answer
  • How much does a dodge tomohawk cost for a used one?
    7·1 answer
  • Which of the following electronic payments is ideal for micropayments?
    11·2 answers
  • Blank Are input instructions you give to a computer
    13·1 answer
  • Heya!!<br><br>•DEFINE DATA SCIENCE??<br>(∩_∩)<br><br>#kavya#<br>​
    6·1 answer
  • How many 2/8 pound patties can she make from 7/8 of a pound of hamburger
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!