Basic error question, The expression to the left of the equals sign is not a valid target for an assignment

1 回表示 (過去 30 日間)
I have been away from MATLAB for a few years, and I didn't realize how much I have forgotten. I dont understand where/why this error is coming from. I was just trying to make a simple example for myself but am having issues with it. "The expression to the left of the equals sign is not a valid target for an assignment" (for the '=' in the rad = xlsread row)
function ArLLDif(rad,gr)
{
rad = xlsread('data1.xls',1,'D3:D164');
gr = xlsread('data1.xls','E3:E164');
plot(rad,gr)
}

採用された回答

the cyclist
the cyclist 2012 年 4 月 5 日
I would say it's the curly brackets that's causing the problem. That's not MATLAB syntax. (You have been away too long!) Try removing those and see how it goes.
  2 件のコメント
MechtEngineer
MechtEngineer 2012 年 4 月 5 日
Yes, I vote with "the cyclist" on his answer. MATLAB functions do not have curly brackets.
Richard Brown
Richard Brown 2012 年 4 月 5 日
As a consolation, it does look nice

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by