LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hello sir,i need labview code for a code which is written in matlab,latter one is attached with this message.

hello sir,i need labview code for a code which is written in matlab...

clc;
close all;
clear all;


Ez= zeros(1,200);

Hy=zeros(1,200);

Ca=1;

Cb=.4519;

n=1;
while(n<1500)

for k = 2:200
Ez(k)=Ez(k) + Cb*(Hy(k)-Hy(k-1));
end
Ez(1)=1;
for k=1:199
Hy(k)=Hy(k)+Cb*(Ez(k+1)-Ez(k));
end
plot(Ez,'b')
hold on
plot(Hy,'r')
hold off
pause(0.001);
n=n+1;
end

 

 

 

thanku 🙂 🙂

0 Kudos
Message 1 of 5
(2,742 Views)

Sorry for being "negative", but:

The forum is no place for simply requesting someone to implement code for you.

 

You know, there are companies out there which do this for their living, so you have to pay for this service.

 

So how to proceed?

a) you tell us where you are located and we can suggest/recommend potential partners who can implement that for you. This will cost some money of course (not the recommendation but the service of implementing!)

b) You start to learn LV and in case you struggle with specific problems, we can help by guiding you to a self implemented solution. This will most likely take more time.

 

So it is up to you to choose which option you are going to follow.

 

thanks,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,732 Views)

You could always use MathScript...

 

MathScriptCode.png

Tim A.
0 Kudos
Message 3 of 5
(2,670 Views)

You can also find additional MathScript information (tutorials, product overview, download instruction) on ni.com/mathscript!

 

 

Tim A.
0 Kudos
Message 4 of 5
(2,637 Views)

Well, this code is quite trivial and if you have to learn LabVIEW anyway, you might as well try to implement it. 😄

 

A few things to remember:

  • The first array element in LabVIEW has index #0, while in matlab it has index #1, so everything dealing with array indices needs to be adjusted slightly.
  • The zeroes function equivalent is "initialize array".
  • Keep the array in a shift register as you update elements.
  • use FOR loops.
  • Use one of the graphs to display the data.
Message 5 of 5
(2,623 Views)