Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to write these to script functions?

1 回表示 (過去 30 日間)
Ish
Ish 2013 年 12 月 3 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
create 3 functions scripts using the variable arguments given.
Fn1(x,a,b,e)= e*x^ab;
Fn2(x,c,f)=f*x+c;
Fn3(x,d,g)=g*x+d;
You are given a file named ‘data04_01.txt’, in this file are 7 values in a column. Assign each value to a letter in abc order. (Ex: the first number listed would be ‘a’ and then the next ‘b’ and so on.) There should be 7 values which should correspond to letters a to g. You will now plot all three functions on a single plot with a legend. Don’t forget to label the axis’ and the plot.
I think they are written like this but I'm not sure
function [y]=Fn1(x,a,b,e)
y=e*x^a-b
  1 件のコメント
sixwwwwww
sixwwwwww 2013 年 12 月 3 日
yes you are right it is written like this

回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 12 月 3 日
Where did you assign something to "y" ?

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by