Run Two Scripts over Single Chart
Ältere Kommentare anzeigen
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!
Akzeptierte Antwort
Weitere Antworten (2)
Ilham Hardy
am 16 Jan. 2012
0 Stimmen
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
am 16 Jan. 2012
0 Stimmen
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
Kategorien
Mehr zu Arithmetic Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!