Convert to MATLAB Code

24 ビュー (過去 30 日間)
Mushahid Rasul
Mushahid Rasul 2020 年 3 月 20 日
コメント済み: Steven Lord 2023 年 11 月 14 日
  5 件のコメント
ayman
ayman 2023 年 11 月 14 日
hi
x(t)=
Steven Lord
Steven Lord 2023 年 11 月 14 日
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the free MATLAB Onramp tutorial to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.

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

採用された回答

Prabhan Purwar
Prabhan Purwar 2020 年 3 月 26 日
Hi,
Following code illustrates the implementation of the above equation:
x=[2 3]; %x vector
f=function_5(x);
function f= function_5(x)
a=ones(2,25); % a(i,j)
sum1=0;
sum=0;
for j=1:25
for i=1:2
sum1= sum1 + (x(i) - a(i,j))^6;
end
sum = sum + 1/(j+sum1);
suom1=0;
end
f=0.002+sum;
end
Hope it helps!!
  4 件のコメント
Walter Roberson
Walter Roberson 2020 年 3 月 26 日
We try to act more like tutors, ideally talking about what the challenges are with the approach a poster has taken, to guide them towards being able to find a solution themselves. This leads them to a greater understanding of programming and of MATLAB and of the topic they are working on -- which is the goal of taking courses. When we give guideance instead of finished solutions, the person can correct the work they themselves have done, and submit the result in good conscience that they did the work and understand the solution.
Mushahid Rasul
Mushahid Rasul 2020 年 3 月 26 日
I’m sorry if I have caused any problems, I had done it on my own but was a little unsure about the equation conversion into Matlab. Thank you for your help. Also I’ll make sure not to ask for complete solutions in the future.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by