フィルターのクリア

fn=['D:/code name of dataset/A' num2str(n) '_' num2str(m) '_' num2str(q) '.bmp']; In this command error shows that is unexpected Matlab expression so how remove this error?

3 ビュー (過去 30 日間)
Nasreen Ehsan
Nasreen Ehsan 2016 年 3 月 30 日
回答済み: Azzi Abdelmalek 2016 年 3 月 30 日
fn=['D:/code name of dataset/A' num2str(n) '_' num2str(m) '_' num2str(q) '.bmp'];
  1 件のコメント
Ced
Ced 2016 年 3 月 30 日
編集済み: Ced 2016 年 3 月 30 日
Assuming you have defined n,m, and q, there is nothing wrong with this line of code.
Just copy paste this in your command window:
n = 1; m = 1; q = 1;
fn=['D:/my_dataset/A' num2str(n) '_' num2str(m) '_' num2str(q) '.bmp'];
You might want to use sprintf though, i.e.
fn = sprintf('D:/%s/A%i_%i_%i.bmp', datasetname, n, m, q);
where datasetname is a string, and n,m,q are integers

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

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 3 月 30 日
n=5
m=4
q=1
out=['D:/code name of dataset/A' num2str(n) '_' num2str(m) '_' num2str(q) '.bmp']
The code works fine, you probably missed a space like :
out=['D:/code name of dataset/A'num2str(n) '_' num2str(m) '_' num2str(q) '.bmp']

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by