Run Two Scripts over Single Chart
古いコメントを表示
Hello!) I was wondering if there is an easy way to run two similar scripts one after another so that their output is placed on the same chart. lets say I have 222.m scrip and 333.m scrip...I tried this code in teh scrip called TWO
figure(1);hold on;
222.m
333.m
and it gives off the followign error:
??? Attempt to reference field of non-structure array.
Error in ==> TWO at 2
222.m
Thanks!
採用された回答
その他の回答 (2 件)
Ilham Hardy
2012 年 1 月 16 日
0 投票
Have you compile and debug the 222.m? It seems the problem lies on the shadowing parameter. Based on the error message you need to check the parameter 'TWO' on 222.m script (lines #2).
Check as well your workspace wheteher the parameter 'TWO' is still correct or accidentally overwritten.
Ilham Hardy
2012 年 1 月 16 日
0 投票
For calling a function (which reside on current path) you just need to use the filename, without file extension.
Try alter your combined chart fun to: %combined charts figure(1);hold on; chart1 chart2
HTH;IH
カテゴリ
ヘルプ センター および File Exchange で Arithmetic Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!