Question
MATLAB HELP
This is currently what has been written. The problem is that pos needs to be answered in a row vector form. Currently it says pos= 1 pos=4 pos=7 pos=8 in the command window when it is run. But, I don't know how to change what is written to make it display as pos = [ 1 4 7 8] instead. How would I change the code to pos to be displayed as [ 1 4 7 8]?
vec = [5 3 2 6 1 1 4 632); target=4; pos = 0; % for index = 1:length(vec) 1- 2- is pos is o when the loop finishes, the varget was not found 4- if vec (index) >= target pos index end 8-end
MATLAB HELPThis is currently what has been written
0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
MATLAB HELP This is currently what has been written. The problem is that pos needs to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • MATLAB QUESTION This is what I have so far written and gives me 1 4 7...

    MATLAB QUESTION This is what I have so far written and gives me 1 4 7 8 as the command window. The issue now is that I must display with a disp function to show pos as [ 1 4 7 8 ]. There is also the question provided above too.

  • MATLAB HELP Solve this problem first by hand and then check your answers in MATLAB. Write...

    MATLAB HELP Solve this problem first by hand and then check your answers in MATLAB. Write the output of the following commands when executed sequentially (i.e. in the order shown, from top to bottom) in the MATLAB command window Expression ans logical a) (6 + 3) >= 8 < 1 11 false 4 > (2 + 9) 11 ~true <- (-2*0.5) 4 + (4 < 7) (3&2) 0) d) e) Given |x= [10, 2, 6, 0, -31: y=[9, 0, 2,...

  • need help adjusting my while loop to avoid this error, this is in matlab 1 clear...

    need help adjusting my while loop to avoid this error, this is in matlab 1 clear all close all 2 3 4 5 6 Egivens EO = 3; Sinput voltage ls = 7*10^-14; Svalue of ls R = 200; $value of resistor C = .026; $value of KT/ 7 8 9 10- V_vec = []; 11 vdiode (1) = 1; $initial guess for Vdiode 12 i=1; 13 14 %iterate until difference between last 2 Vdiodes < 10^-6 15 - while...

  • matlap Question 1 1. Consider the following Matlab program 5 - (2 < 3) & (C2...

    matlap Question 1 1. Consider the following Matlab program 5 - (2 < 3) & (C2 > 3) 1 (1 - 0)) What is the final value of s? A. True B. *1 CO D. false 2- Which expression tests whether variable x is between (but not the same as) the values 5 and 10 (a) 5 <x< 10 (b) 5 <= x <= 10 (c) 5 < X & X > 10 (d) x < 10 & 5 <...

  • Please help me with this MATLAB programming problem! Im coding iin MATLAB2018 if that makes any d...

    Please help me with this MATLAB programming problem! Im coding iin MATLAB2018 if that makes any difference! The first picture is the question i need to answer. The picture below is used as reference to answer the question. The last picture (below) is the into to the problem, and is used as reference. 1. Use Matlab to create the following single plot with three subplots. All titles, gridlines, and axis labels should be as shown. Arc System Response 15 E...

  • MATLAB This is a copy and paste of what we need to do. Enter this in...

    MATLAB This is a copy and paste of what we need to do. Enter this in MATLAB. Please explain what you are doing and why. I don't just want the answer. I want to study this. This is a 100 class and the teacher teaches it as if we are 300 students.... please help me learn not just get the answer % q11_sol.m % % Quiz #11 solutions % February 11, 2020 % %% Part 1 % For the given...

  • Matlab fprintf help This is the question: I have already done part a, I need help...

    Matlab fprintf help This is the question: I have already done part a, I need help with part b. This is my current code: % array of Pounds to convert to Kilograms weight_pound = [50.543 65.676 75.343 80.937] % for Loop that calls from the array weight_pounds for index=1:4 %Convert weight from Pounds to Kilograms     weight_kg = weight_pound*0.453592 %Print out the conversion % ‘%5.2f’ for 2 decimals for Kilograms % ’%5.0f’ for no decimals in pounds     fprintf(‘%5.2f kg...

  • Currently working on a Java Assignment. I have written most codes for swap, reverse and insert....

    Currently working on a Java Assignment. I have written most codes for swap, reverse and insert. Just need a. itemCount receives a value and returns a count of the number of times this item is found in the list. c. sublist receives two indexes and returns an ArrayList of node values from the first index to the second index, provided the indexes are valid. d. select receives a variable number of indexes, and returns an ArrayList of node values corresponding...

  • Need help with Intro to Comp Sci 2 (Python) problem: This is what is provided: (Copy/Paste...

    Need help with Intro to Comp Sci 2 (Python) problem: This is what is provided: (Copy/Paste version): from tkinter import Tk, Label, Entry, Button from random import * class Craps(Tk): #set up the main window def __init__(self, parent=None): Tk.__init__(self, parent) self.title('Play Craps') self.new_game() self.make_widgets() #when a new game is started, the firstRoll will start at 0 def new_game(self): self.firstRoll = 0    #create and place the widgets in the window def make_widgets(self): Label(self, text="Die 1").grid(row=0, column=0, columnspan=1) Label(self, text="Die 2").grid(row=0,...

  • In matlab, I keep getting the same issue for this problem can someone help? "myrowproduct.m" >> Filename...

    In matlab, I keep getting the same issue for this problem can someone help? "myrowproduct.m" >> Filename myrowproduct (A,x) Undefined function or variable 'Filename' Did you mean: mfilename : myrowproduct (A, x) Undefined function or variable 'myrowproduct' function y = myrowproduct(A,x); function y my rowp roduct (A, x); Error: Function definition not supported in this context. Create functions in code file. (, 2,,)T 4. The product y Ax of an m x n matrix A times a vector x= can...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT