LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot run this script in matlab

Hello..

 

Can anyone help me in running this script in matlab. It is a code in matlab for finding a R transformation. 

 "letzt_size reduced_2.jpg" is the inlut image we gives. Any image can be used. I tried to put this code in a Mathscript functionnode. Butit is not working. Otherwise this code works in Matlab.

--------------------------------------------------

D = imread('letzt_size reduced_2.jpg');
imagesc(D)
imshow(D)
[R,xp] = radon(D,[0 45]);
figure; plot(xp,R(:,1)); title('R_{0^o} (x\prime)')
theta = 0:360;
[R,xp] = radon(D,theta);
imagesc(theta,xp,R);
title('R_{\theta} (X\prime)');
xlabel('\theta (degrees)');
ylabel('X\prime');
set(gca,'XTick',0:20:180);
colormap(hot);
colorbar
save radon R xp -ascii -double -tabs

---------------------------------------------------

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 5
(3,207 Views)

Hi Nghtcrwir,

the reason is LabVIEW doesnt have "imread" function in  Mathscript function node.

You can use LabVIEW help to check which matlab programs are supported by Mathscript function node.

 

All the Best!

 

Ritesh

0 Kudos
Message 2 of 5
(3,180 Views)
I am sorry. its not the "imread" but the "imagesc" sunction which is not supported by Mathscript node.
0 Kudos
Message 3 of 5
(3,174 Views)
You can use the Matlab script node if you have to if the MathScript node doesn't support the functions you need. The downside is that this will require having Matlab installed on the target machine.
0 Kudos
Message 4 of 5
(3,168 Views)
ok.. lemme try both,,,,
Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 5
(3,135 Views)