How to write this equation in matlab syntax/code? I also attached comments for better understanding...

%..Actual equations in paper : h_(i,M) = summation(k ∈ K'_(M)) 1(gamma_(i,k)^(M) ≥ theta_(i) ); %
% γ_(i,k)^(M)= p_(i,M) g_(i,M)/(I_(i,k)^(S) + σ ^ 2 ).
h_(i,M) = \sum \limits _{k \in \mathcal {K}_{M}'} {\textbf {1}(\gamma _{i,k}^{M} \ge {\theta _{i}})};
p_{i}= \alpha_{1}\left({\frac{t_{i}^{max}}{\bar T_{max}}}\right) + \alpha_{2} \left ({\frac{h_{i}}{\bar H}}\right)...
+ \alpha_{3} \left({\frac{\bar E}{e_{i}^{L} - c_{i} \delta ^{R}}}\right);
% p_(i) = α_(1)(t_(i,max)/ ¯T_(max)) + α_(2)(h_(i)/¯H) + α_(3)( ¯E / e_(i,L) − c_(i) δ_(R)),
%.......there is a BAR on T,H,E AND these three variables are equal to the following ;
% {\bar T}_{max}=summation\nolimits_{i\in\mathcal {G}_{O}} t_{i}^{max},
% {\bar H}= summation\nolimits_{i\in\mathcal {G}_{O}} h_{i},
% {\bar E}= summation\nolimits_{i \in \mathcal {G}_{O}} (e_{i}^{L} - c_{i} \delta^{R}) .
% α_(j)(j = {1,2,3}) is a coefficient , 0 <= α_(j) ≤ 1 and summation_(j=1,3) α _(j)=1.

5 Comments

You must specify what errors you are getting and/or what problems you are facing with the code.
Witth all due to respect, Sir i getting invalid character(s) , parse error '\': usage might be invalid matlab syntax and error on the last both ends of the for and if statements. And i also want to check my code specifically line no : 15,18,27 because i think the syntax of these equations is not valid for matlab. Thank you for your time .With sincere thanks.
You're trying to run something like LaTeX code as MATLAB code. That is not going to work. You will need to implement the algorithm described in that paper in MATLAB code, or perhaps ask the author of that paper if they have MATLAB code they can share with you, or (if this is not for a school assignment) contact a consulting service like the MathWorks Consulting department.
If you're not sure where to start because you feel you don't know how to use MATLAB, I recommend taking the MATLAB Onramp tutorial to learn the essentials of MATLAB.
If while working on implementing the algorithm you encounter a problem show us what you've tried and ask a specific question about where you're having difficulty and we may be able to help with that specific question.
Sir , error is in the above mention equations invalid matlab syntaxa always shows when i try to run this program. So just want how to convert LaTex into matlab. And rest of the errors i remove them by my own. That's it ...thanks in advance.
There is no program for converting LaTex into MATLAB code.
The algorithm you are working on uses notation that is ambiguous and needs to be examined in context of the paper to figure out what it means. Based upon some of the other fragments you have posted, I suspect the portion
is intended to mean that k is an element of the complement of the set named K subscript M, where the subscript is just part of the name, and the context would be needed to figure out what the complement was with respect to. But it is also possible given the context that K is a vector of sets, and that you want to pull out the one indexed at M, and take the complement of that.

Sign in to comment.

Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products

Release

R2018a

Asked:

on 17 May 2019

Commented:

on 18 May 2019

Community Treasure Hunt

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

Start Hunting!