i find difficulties to write this below code to embedded matlab function..help please

clear all;clc; Pi=pi; F0=0; f_samp=100000; freq=5000; %freq=1/0.0005; vd=295; q=5; condition=0; while condition ~=1 F_out=input('enter the output freq. in Hertz (0 to 120):'); if F_out>120 condition=0; disp ('*** it must be in the range 0 to 120***'); elseif F_out0 v_phase=T_phase*U_1; v_line=T_line*U_1; T5=T5-1; %ch1(t)=U_1(1)*q; else v_phase=T_phase*low; v_line=T_line*low; T6=T6-1; %ch1(t)=low(1)*q; if T6

Reply to
aimad
Loading thread data ...

Your main difficulty is that you slept through most of your classes - especially the ones about how to write clear, documented and structured code, and the ones about how to ask sensible questions. Try asking your teacher for help - or perhaps talk to your fellow students (the ones that paid attention to lectures and finished their homework on time).

Reply to
David Brown

most of original code in post snipped

@ Aimad,

There is a MATLAB newsgroup, comp.soft-sys.matlab but you probably won't get this question answered there unless you express it more clearly. To start with, explain what you mean by "embedded matlab function" - do you mean a MATLAB function or do you mean to use some features of the MATLAB embedded coder ?

If the former then try something simple first, read the excellent MATLAB on line help, Google, etc etc.

Michael Kellett

Reply to
MK

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.