Has matlab a function to swap a vector? And generate a graph with 3 datasets.

조회 수: 37 (최근 30일)
Hello,
Q1. I want to swap a vector like below, Is there a built-in function in Matlab? a = [ 1 2 3 4 5 6 ] a = swap(a) = [6 5 4 3 2 1 ]
Q2. I want to generate a graph for three data sets with different length. Each data set ranges from 0 to 1. E.g. ds1 = [0 0.1 0.25 .... 0.998 1] ds2 = 0:0.01:1 ds3 = [0 0.1 0.15 0.179 0.201 .... 1] And the graph looks like below (Actually, they are two histogram) https://biolab.csr.unibo.it/FvcOnGoing/FvcWebReports/477/DistributionGraph.png
Let ds2 to be the horizontal axis. And plot ds1 and ds2 along with vertical axis.
  댓글 수: 1
the cyclist
the cyclist 2013년 6월 11일
I suggest you split this into two questions, so that you can accept answers separately.

댓글을 달려면 로그인하십시오.

채택된 답변

the cyclist
the cyclist 2013년 6월 11일
Answer to Q1: Use the fliplr() function.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by