matlab code for ramp

hi..how to get the below mentioned matlab output,using ramp and some other functions?could u please post the code?

回答 (1 件)

Image Analyst
Image Analyst 2015 年 11 月 5 日

0 投票

Try this
x = linspace(0,15,300)
y = [linspace(0,5,100), 5*ones(1,100), linspace(5, 0, 100)]

2 件のコメント

saranya s
saranya s 2015 年 11 月 6 日
thanku so much for ur ans sir..bt i want to get the output using functions alone.
Image Analyst
Image Analyst 2015 年 11 月 6 日
What do you think linspace() and ones() are? They are functions. I don't think disallowing brackets and equal signs is reasonable. Why do you have this requirement anyway? I mean, you could also do it with the colon operator, but why would that also be disallowed? MATLAB certainly uses functions but it also requires other things like certain mathematical operators and symbols like = ] ( ) , & && | { } and ;
Sorry, but I'm afraid I can't help you.

サインインしてコメントする。

カテゴリ

タグ

タグが未入力です。

質問済み:

2015 年 11 月 5 日

コメント済み:

2015 年 11 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by