Info

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

I want to solve this equation and plot it but lot of errors are coming kindly help

1 回表示 (過去 30 日間)
Arslan Ahmad
Arslan Ahmad 2017 年 5 月 4 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
x=0:3;
y=diff((x^3)*(ln(3*x+1))^2)
  2 件のコメント
John D'Errico
John D'Errico 2017 年 5 月 4 日
編集済み: John D'Errico 2017 年 5 月 4 日
I see three distinct problems (arguably a 4th too), one of which was done 3 separate times. That many problems in essentially one short line of code suggests you need to read the getting started tutorials. While you might think that this comment is non-constructive since it does not directly answer your question, in fact, it is. While somebody will probably come along and show you what to change in that one line, there are also problems of concept, that suggest you don't understand MATLAB. Showing you how to get one line of code right will not help you in the long run, whereas reading the basic documentation will serve you greatly.
Arslan Ahmad
Arslan Ahmad 2017 年 5 月 4 日
could you correct my question now please

回答 (1 件)

Santhana Raj
Santhana Raj 2017 年 5 月 5 日
Matrices multiplication can be element by element or vector multiplication. For element by element, which I assume you want, the operator is
.*
Secondly, ln is not a function in matlab. Use log.
Thirdly, I think you want x to be from 0 to 3. whatever you have written will create 4 elements. [0 1 2 3]. I am assuming that you want to do [0:0.1:3]
Fourthly, are you sure you want the difference and not the derivative.

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

Community Treasure Hunt

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

Start Hunting!

Translated by