Indarnav
asked on
not running after change
i made attached program in matlab. it gets input from data1 file. when open matlab and run the attached file, it shows output. but when i open data1 file and change some value in that and save the changes and re run the main file,no output came.
why so? if i close all and re open then i shows output as per changes done.
main.jpg
why so? if i close all and re open then i shows output as per changes done.
main.jpg
ASKER
attaching both files for your refernce.
file iflow_asymetrical.m is main file and data1.m is input data file. when u run iflow_asymetrical.m, it gives output as graph. when u make changes in data1.m and re run, you will not get graph, but if u restart matlab, it will show graph again.
make changes in line 144 only in data1.m
change ext of both to .m after saving.
lflow-asymetrical.txt
data1.txt
file iflow_asymetrical.m is main file and data1.m is input data file. when u run iflow_asymetrical.m, it gives output as graph. when u make changes in data1.m and re run, you will not get graph, but if u restart matlab, it will show graph again.
make changes in line 144 only in data1.m
change ext of both to .m after saving.
lflow-asymetrical.txt
data1.txt
What changes exactly do you make in data1.m?
Where are two unknown functions: ybus_asym and bx_asym. Is it one of those creates a plot? Since there are no other plot functions in the code. I think your problem might be in one of those functions.
Before rerunning the code, do you close the figure or not? Are you sure there is no figure window in the background
You also didn't answer, what happens if you (1) rerun the code without changes. (2) doing clear all before.
Last question, what OS and Matlab version are you using? Just not to ask you later.
Where are two unknown functions: ybus_asym and bx_asym. Is it one of those creates a plot? Since there are no other plot functions in the code. I think your problem might be in one of those functions.
Before rerunning the code, do you close the figure or not? Are you sure there is no figure window in the background
You also didn't answer, what happens if you (1) rerun the code without changes. (2) doing clear all before.
Last question, what OS and Matlab version are you using? Just not to ask you later.
ASKER
attaching other required functions.kindly rename file to .rar and extract functions.
regarding your query.
1. if i re run code without changes,even then no graph generates.
2. yes i closed all graph windows before re run.
3. using vista
4. matlab 2009a/ 7.8 version.
Desktop.txt
regarding your query.
1. if i re run code without changes,even then no graph generates.
2. yes i closed all graph windows before re run.
3. using vista
4. matlab 2009a/ 7.8 version.
Desktop.txt
So the data1 editing is not the reason.
Did you try to do clear all?
If you don't have figure window after rerun, Matlab should return some error (in red) in Command Window. Please show it here.
Still don't have all the functions to test your code:
s_asym
HL_asym
matrixreduction
clmnmatexpn
Did you try to do clear all?
If you don't have figure window after rerun, Matlab should return some error (in red) in Command Window. Please show it here.
Still don't have all the functions to test your code:
s_asym
HL_asym
matrixreduction
clmnmatexpn
ASKER
sending u complete set of files.
MATLAB.txt
MATLAB.txt
I run the code for several time and have no problems (except no rad2deg function, but it should not be problem).
There is a pause command in the code. After you see figure you should press any key to continue. I hope you do it, right?
So, I probably can help if you answer two questions from my previous post.
There is a pause command in the code. After you see figure you should press any key to continue. I hope you do it, right?
So, I probably can help if you answer two questions from my previous post.
ASKER
please verify the method of operation
open matlab
open iflow...
press F5
it will display graph
close the graph
open data1
change value
save changes
close data1
press F5
open matlab
open iflow...
press F5
it will display graph
close the graph
open data1
change value
save changes
close data1
press F5
ASKER
i followed above method, but when i press F5 after changes... no graph comes?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks a lot, it is working fine now.
If you rerun your code without any changes in data1.m, no output again?
If you clear all variables before rerunning your code with 'clear all', will it change anything? Be careful not to delete variables not generated by your code that you may need.
Please give us more details what changes you make in data1.m. If possible please show some sample data. You can either attach it as a file or copy and paste into code snippet. Note you cannot upload m-file, rename its extension to txt first.
What code do you have after what you show. Is it only comments? Or something that may affect your data? If yes, please show it here also.
A note on your code. You can see a lot of orange bars (warnings) on the right. You don't need to use [] with single variable, only when you do concatenation, like [noele, nophases].
Also why keep your data in m-file? These file supposed to be matlab's functions and scripts.