Question Details

[solved] I have two matlab questions, MOOC The function move_me is def


I have two matlab questions,

MOOC

  1. The?function?move_me?is?defined?like?this:?function?w?=?move_me(v,a).?The?first?input?argument?v?is?a?row-vector,?while?a?is?a?scalar.?The?function?moves?every?element?of?v?that?is?equal?to?a?to?the?end?of?the?vector.?For?example,?the?command?>>?x?=?move_me([1?2?3?4],2);?makes?x?equal?to?[1?3?4?2].?If?a?is?omitted,?the?function?moves?occurrences?of?zeros.

and?


  1. Write?a?function?called?small_elements?that?takes?as?input?an?array?named?X?that?is?a?matrix?or?a?vector.?The?function?identifies?those?elements?of?X?that?are?smaller?than?the?product?of?their?two?indexes.?For?example,?if?the?element?X(2,3)?is?5,?then?that?element?would?be?identified?because?5?is?smaller?than?2?*?3.?The?output?of?the?function?gives?the?indexes?of?such?elements?found?in?column-major?order.?It?is?a?matrix?with?exactly?two?columns.?The?first?column?contains?the?row?indexes,?while?the?second?column?contains?the?corresponding?column?indexes.?For?example,?the?statement?indexes?=?small_elements([1?1;?0?4;?6?5],?will?make?indexes?equal?to?[2?1;?1?2;?3?2].?If?no?such?element?exists,?the?function?returns?an?empty?array.

Any help would be appreciated. ?


Answers

 

Q1) x= [1 2 3 4]

 

idx=2

 

move=@(x,ii)[x(setdiff(1:numel(x),ii)) x(ii)]

 

If you want to move the second number of x

 

out=move(x,2)

 

Q2)

 

Function small element (X)

 

[nn,mm] = size (X)

 

For ii =...

 


Solution details:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: Sep 18, 2020

PRICE: $15

Solution~0001065034.zip (25.37 KB)

Buy this answer for only: $15

This attachment is locked

We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy from our tutoring website www.aceyourhomework.com (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

Sep 18, 2020

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP/h4>

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • As a reference for in-depth understanding of the subject.
  • As a source of ideas / reasoning for your own research (if properly referenced)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

NEW ASSIGNMENT HELP?

Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN YOUR SET DEADLINE.

Order Now