- This topic has 14 replies, 4 voices, and was last updated 8 years, 8 months ago by alistu.
-
AuthorPosts
-
-
March 1, 2016 at 10:28 am #30715Idahor EmmanuelParticipant
HELLO,
I am having problem co simulating my matlab with my optisystem design, can someone help please?
-
March 1, 2016 at 10:37 am #30720Aabid BabaParticipant
Hello Idahor,
Can you please explain what is the exact problem you are facing?? -
March 1, 2016 at 10:43 am #30723Idahor EmmanuelParticipant
Thanks… Im having an undefined error of “parameter” when optisystem calculates the matlab component with electrical signal. i have attached the files for i have been facing the same error for more than a week.
-
March 1, 2016 at 11:21 am #30734aasif bashir darParticipant
hi all,
there are number of previous posts already on forum,i suggest you to go through them. iT will completely provide you necessary information you would require.
with regards
-
March 1, 2016 at 11:33 am #30735Idahor EmmanuelParticipant
I have gone through most of it .. and thats how i was able to get a basic idea about it. It calls the matlab from optisystem but it has an undefined error.. thats what i dont understand.
-
March 1, 2016 at 12:54 pm #30758alistuParticipant
Hi Idahor,
If these are the same files you have attached in the other forum page, the problem is that you have made a mention of “parameter0” in you Matlab codes, while such parameter is unknown to Matlab component. First you have to add it to the main tab of Matlab component properties using “add parameter” and then the problem is solved.
Regards
-
-
March 1, 2016 at 9:32 pm #30791Aabid BabaParticipant
Hello Idahor,
You are welcome.
You have not defined this ‘parameter0’ in your Matlab code and Optisystem takes these as junk quantities. As alistu mentioned , you need to define this parameter in your Matlab code first and afterwards when you simulate it works fine. Hope it is helpful.With Regards
-
March 3, 2016 at 11:44 am #31263Idahor EmmanuelParticipant
Thank you so much.. I have defined the parameter’0′.. and the error changed to a different thing. Now its saying an ‘end’ is missing in the code. I have checked and the number of end is correct… anyhelp please? i attached a picture of the error which i get… thanks
-
March 3, 2016 at 12:00 pm #31267Aabid BabaParticipant
Hi Idahor,
i don’t see an ‘end’ command missing. Is it the full code you have put up here??
With regards -
March 3, 2016 at 12:46 pm #31273Idahor EmmanuelParticipant
Yes thats the same thing i saw it … and it kept giving me see error. i attached the system. and am getting the same error.
-
March 3, 2016 at 5:42 pm #31299alistuParticipant
Hi Idahor,
I have downloaded the .m file from here and the program is different from the one you have attached the screen shot of in one of your previous replies. In this program, the error is still about Parameter0 not being defined in the Matlab program. Please check if you have attached the correct .m file.
Regards
-
-
March 3, 2016 at 12:50 pm #31278aasif bashir darParticipant
hi idahor,
you jus put abnother ‘end’ statement at the end of code, may be it could work, but code seems to perfect tom me.
with regards -
March 3, 2016 at 5:46 pm #31300alistuParticipant
I see you have used Matlab program in OptiSystem Run Command box in the Matlab component. I suggest instead of that, you write your program in a separate .m file and only write the name of the file in Run Command and address it in the corresponding box in matlab component and then run the calculations.
-
March 4, 2016 at 3:48 am #31412Idahor EmmanuelParticipant
Yes i have checked and i kinda fixed it… I fix one problem and another pops out. Its all part of the learning process i guess. I was able to call it as alitsu suggested but im having an error with my OutputPort1. From calculating the matlab component. The outputPort1 is the error now.
-
March 4, 2016 at 4:20 am #31427alistuParticipant
Indeed it is a part of learning. I analyzed the modified system and realized your output is binary while your input is electrical. So when you use the command “OutputPort1=InputPort1”, you are creating an electrical output instead of a binary output. Besides, you never give the result of your calculations to the output vector in your program. Please verify if I am correct.
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.