Info

此问题已关闭。 请重新打开它进行编辑或回答。

Loops, Arrays, Average, and 3D shapes display help? please and thank you

1 次查看(过去 30 天)
1. Write a loop which will be increasing variable i by 5 at each iteration till i reaches 50. Initial value of i is 12.
2. Make a loop in such way that i will be increasing by 5 from 4 up to 30 and by 3 from 30 till up to 50.Tip: this can be easier to do with ‘while’ loop, and with using ‘if’ statement.
3. Make 1 figure with 2 plots in 1 row. First plot will be empty, and second plot will contain bar plot of all values of i from one of the above loops. Tip: create additional variable v which will 'remember' values of i from each iteration.
4. Check if any element of v is not a number 5. Calculate average v
6. Modify one of the above loops in such a way that Matlab will ask you to specify in the command window the initial value of i.
7. Make an interactive plot which will allow you to draw a continuous line with 3 segments
8. Make an array Arr where element Arr(m,n)=i(m)+j(n)*i(m), and i is changing from -5 to 20 and j is changing from -13 to 9.
9. Make 3 dimensional plot to display Arr
10. Check if sum of values in 2nd row is bigger than sum of values in 4th row of Arr
VER

回答(1 个)

Daniel M
Daniel M 2019-10-4
编辑:Daniel M 2019-10-4
I suggest you take the MATLAB onramp course.

此问题已关闭。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by