フィルターのクリア

Fortran to matlab code

2 ビュー (過去 30 日間)
Matlabuser
Matlabuser 2014 年 11 月 12 日
コメント済み: Matlabuser 2014 年 11 月 17 日
Hi everyone, I have a code in fortran and I want to convert that code in matlab. But problem is that, in fortran I have I=-N+1:N+1;
But in matlab, If I take the negative no. I have the problem of indexing. Can anyone please tell me, how I can solve this problem?
Thanks

採用された回答

Torsten
Torsten 2014 年 11 月 12 日
If you mean
I=-(N+1):(N+1)
then shift the indices by N+2 for the MATLAB application.
Then in_Matlab I will be I=1:(2*N+3)
Best wishes
Torsten.
  2 件のコメント
Matlabuser
Matlabuser 2014 年 11 月 12 日
Thank you Torsten !!!
Matlabuser
Matlabuser 2014 年 11 月 17 日
a=-N+2
i=-N+1,N-1
p(i)=p(a)-p(a-2)
a=a+1
I did not know how to change this in matlab

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by