フィルターのクリア

how get content of a special cell of excel?

2 ビュー (過去 30 日間)
Mahdi
Mahdi 2015 年 1 月 2 日
コメント済み: Image Analyst 2015 年 1 月 3 日
Hi Every one,
i have attached an excel data, which is same as main table in my program. After some calculation i become 3 strings. They exist in Column and row of attached excel data:
  • 1. String ==> Part 1 or Part 2 (in the main column)
  • 2. String ==> A or B (in the sub column)
  • 3. String ==> Product1 or ...2 or ...3 or ...4
Now i muss used these 3 string to get "Quality" and "Performance" of a Product. For Example
  • 1. String:Part 2
  • 2. String:A
  • 3. String:Product3
Result: Quality=21, Performance=22
Question: How can I get these two parameters (result) in accordance with three strings (input) with programming in MATLAB?

回答 (1 件)

Image Analyst
Image Analyst 2015 年 1 月 2 日
編集済み: Image Analyst 2015 年 1 月 3 日
Did you try to make a function with those parameters, and inside call xlsread()?
function [quality, performance] = myFunction(part2, a, product3)
[numbers, strings, everything] = xlsread(filename);
% Now extract the two things you need: quality, performance....
Why don't you try something like that?
  2 件のコメント
Mahdi
Mahdi 2015 年 1 月 3 日
I have written this Program. How could I write it better?
Image Analyst
Image Analyst 2015 年 1 月 3 日
text() is a built-in function so don't use it for the name of one of your variables. Your column and row numbers are constantly being overwritten in the inner most part of your for loops. Put in more comments to help people follow your code. I'm not sure what the loops are for.
Somehow the program is now missing. Please reattach it so I can give further comments.

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

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by