フィルターのクリア

Plotting a range of values from a matrix

5 ビュー (過去 30 日間)
Adam Francki
Adam Francki 2019 年 4 月 10 日
回答済み: madhan ravi 2019 年 4 月 10 日
For example if I had:
A=[1;2;3;4;5;6;7;8;9;10] B=[10;9;8;7;6;5;4;3;2;1] t=1:10
I want to plot part of matrix A and join it up with part of matrix B.
So I want to plot the elements of A from 1 to 5 and then join up with the element values from B of 5 to 1. How would I do this?
I’ve got a bigger problem I’m tryig to solve but this is just a simplied example I can use to answer my homework problem.

回答 (1 件)

madhan ravi
madhan ravi 2019 年 4 月 10 日
Use simple indexing:
[A(1:5);B(end-4:-1:end)]

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by