How to save the extracted features of an image in a matfile?

4 ビュー (過去 30 日間)
Mayss Aliyeh
Mayss Aliyeh 2017 年 5 月 2 日
編集済み: Mayss Aliyeh 2017 年 5 月 5 日
I've been trying to save the extracted features of the clusters in a variable in .mat file, but i'm new to matlab and don't know how to deal with .mat files So, there is the code I have wrote, not really sure if it's correct:

回答 (1 件)

Adam
Adam 2017 年 5 月 2 日
編集済み: Adam 2017 年 5 月 2 日
Well, since your question is on saving a mat file, theoretically the rest of the code and problem is not relevant and
doc save
would be your first port of call. In your code you are not giving a filename to the save command. Or rather, since you are using the command form of the syntax it is interpreting what you do give as a filename which will not make sense.
I almost never use command form syntax when function form is available. Just something like
save( 'MyFilename.mat', 'imgsdb', 'IMGDB' )
should work fine. Note the quotes around the variable names. This catches a lot of people (me included, even now sometimes!) out. The variables you want to save are given to the save function as strings giving the variable name, not just passing the raw variable.
  2 件のコメント
Mayss Aliyeh
Mayss Aliyeh 2017 年 5 月 2 日
Thank you, i'm receiving some errors, of how to save the variables of the features in IMGDB, how do we write them, if you may?
Adam
Adam 2017 年 5 月 2 日
What are the errors. IMGDB appears to just be a struct so it should save fine, but if it has fancy objects attached to it some of them may potentially cause problems. At a glance, it's fields appear to just be standard types though.

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

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT-Files についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by