Run Two Scripts over Single Chart
Mostra commenti meno recenti
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!
Risposta accettata
Più risposte (2)
Ilham Hardy
il 16 Gen 2012
0 voti
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
il 16 Gen 2012
0 voti
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
Categorie
Scopri di più su Arithmetic Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!