True or false to elements of a cell array?

3 ビュー (過去 30 日間)
Jonathan Babitsch
Jonathan Babitsch 2020 年 5 月 12 日
回答済み: Guru Mohanty 2020 年 5 月 15 日
Hi everybody,
I have a problem with my code which i attached also. Here is a screenshot of my error:
Isn't it possible? If not, is there a possibility to to further advance in the code? I only want to work with the element of the cell array if it doesn't fulfill the criteria in line 182. Thanks a lot for your help in advance, I'm a beginner in Matlab.
Johnny

採用された回答

Guru Mohanty
Guru Mohanty 2020 年 5 月 15 日
Hi, I understand you are getting some problem with your code. The error is due to these following reasons.
  1. In the Line
if inside{allepunkte}{huellkoerper}==true & outside{allepunkte}{huellkoerper}==true
The inside is a 1D cell array of size 1x8, but the code treats it as a 2D cell array.
2. There is an undeclared variable 'verschz' in the code.
After resolving these following issues the code should work.
Note: In the following Lines
if inside{allepunkte}{huellkoerper}==true & outside{allepunkte}{huellkoerper}==true
%hier wird nun ermittelt in welchen er wohl verschoben werden soll,
%mit anderen Worten: Welcher Körper liegt dem Punkt am nächsten
else
There is nothing inside the if statement. You can consider modifying this codition. I have attached the modified code.

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by