How to translate command "GOTO" in fortran into Matlab
Hello all Matlab lovers: I meet some problem when I translate some fortran code into Matlab. In the fortran it is like this: ITER = 0; ...... (very long, around 2000 lines) ...... UMAX = ..... (100) if (UMAX <= 1e-7 or ITER >= 100) then LSTOP =TRUE ITER=ITER+1 GOTO 100 .... How can ... 22 Mar 2010 20:39
hydraulic valve modelling
I'm trying to model a proportional hydraulic valve with a pressure reducing and a pressure relieving action in Simulink or Simscape. Since this is quite a difficult task I was wondering if there were some people with more experience in this area. The valve has three ports and is a spool type valve: one port for in a... 22 Mar 2010 14:13
datestr not writing to excel properly
Hi, I'm trying to write time data to an excel file. Example code below shows formatting: exceldata={'Time','Data'}; for i=1:5 pause(0.2) time=datestr(now, 'HH:MM:SS.FFF'); % time in hour:minute:second.milisecond format data=rand(1); exceldata(size(exceldata,1)+1,1:2)={time,data}; xlswr... 23 Mar 2010 06:43
psnr for images with different range
Hi, I'm looking for a formula that would link SNR and PSNR calculated for 0..255 range images to 0..1 range images. Is anyone aware of such a formula? Thank you! ... 22 Mar 2010 14:12
Methods block: constructor doesn't find other method
Hello There, I've written a simple class in a classdefinition file. There are only two methods by now. The constructor and a function that should test if a condition is fullfilled for an instance of this class. The result is also saved in a property of that class. I want to call the helper method from the constructo... 22 Mar 2010 14:12
Scaling different 2D figures to be the same size
Hello-- I would like to create a number of plots in Matlab for inclusion in a Latex document. The Latex processor that I am currently using is Lyx. What is the best way to export 2D plots created by the plot command so that the bounding plot boxes are all the same size? I would like to create a number of ... 22 Mar 2010 15:29
mex problem :: can't map file, errno=22
Hi, I really hope I will get an answer to this thread. I'm trying to port a C++ function for an image based object segmentation written and compiled on a fedora linux system, a mex-file was created and run successfully on matlab. Now when trying to create a mex-file for a Mac based OSX 10.5 (intel based) with Matla... 22 Mar 2010 14:12
isfinite() of sparse -- cleverness needed
Greetings, I used to have this line of code: D(~isfinite(D)) = 0; However, as the size of D has grown, I've had to go to sparse D. As a result, isfinite(D) returns an out-of-memory error. I could do something like: D=sparse(N,M); % lots-of-stuff for a=1:N*M; if ~isfinite(D(a)) D(a)=0; end end ... 24 Mar 2010 07:42
3d volume to 2d
If I have 3d volume and I want to creat 2d images what commands will help me, Please suggest me how I can proceed to get nice 2d images. Thanks and regards, Priya ... 22 Mar 2010 13:04
fitting an integral function to a data set
Hi, does anyone have a good suggestion on how to fit any integral function in an smart way to a data set y? What is the best syntax to use? For example b / y(t) = | p*exp(1/2*(-v+V)/G^2)*t dv / a with the right hand side being an integral from a to b, and where V, ... 22 Mar 2010 13:04