Search Results

Search found 1466 results on 59 pages for 'matlab toolbox'.

Page 2/59 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • "Snap an image" in MATLAB

    - by Megan Mathews
    I am a beginner and for lack of a better way to put this, does MATLAB have a function that will "snap an image" or move an image to some predefined location if within a certain area? I have checked out some forums with no luck so far. Thank you so much for your assistance.

    Read the article

  • Matlab help: I am given a second order differential equation.I need to use matlab to find unit step response and impulse response?

    - by Cady Smith
    I have the second order differential equation d^2(y(t))/dt^2+ B1*d(y(t))/dt+ c1*y(t)=A1*x(t) t is in seconds and is greater than 0. A1, B1, C1 are constants that equal: A1= 3.8469x10^6 B1= 325.6907 C1= 3.8469x10^6 This system is linear, time-invariant, and casual. The system is called H1. I want to use Matlab to compute and plot the impulse response function h1(t) and the unit step response function g1(t) of this system.

    Read the article

  • Installing Matlab on ubuntu 12.04 32 bits

    - by Amir
    I have been trying to install Matlab2012a, matlab2012b and Matlab2013a for like 4 hours, triedto fix my prospective errors regarding the posts 2012a, Ubuntu-Matlab Documentation and Matlab-central. But either i am recieving an error while the installation GUI pops-up with the error : The application encountered an unexpected error and needs to close. You may want to try re-installing your product(s). More information can be found at /tmp/mathworks_amir.log On the other hand for 2012a. and the errors for 2012b and 2013a is : `Installing ... Exception in thread "main" com.google.inject.ProvisionException: Guice provision errors: 1) Error in custom provider, java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at com.mathworks.wizard.WizardModule.provideDisplayProperties(WizardModule.java:60) while locating com.mathworks.instutil.DisplayProperties at com.mathworks.wizard.ui.components.ComponentsModule.providePaintStrategy(ComponentsModule.java:76) while locating com.mathworks.wizard.ui.components.PaintStrategy for parameter 4 at com.mathworks.wizard.ui.components.SwingComponentFactoryImpl.(SwingComponentFactoryImpl.java:110) while locating com.mathworks.wizard.ui.components.SwingComponentFactoryImpl while locating com.mathworks.wizard.ui.components.SwingComponentFactory for parameter 1 at com.mathworks.wizard.ui.WizardUIImpl.(WizardUIImpl.java:65) while locating com.mathworks.wizard.ui.WizardUIImpl while locating com.mathworks.wizard.ui.WizardUI annotated with @com.google.inject.name.Named(value=BaseWizardUI) at com.mathworks.wizard.ui.UIModule.provideWizardUI(UIModule.java:50) while locating com.mathworks.wizard.ui.WizardUI for parameter 0 at com.mathworks.wizard.ExceptionHandlerImpl.(ExceptionHandlerImpl.java:22) while locating com.mathworks.wizard.ExceptionHandlerImpl while locating com.mathworks.wizard.ExceptionHandler 1 error at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:767) at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:793) at com.mathworks.wizard.WizardLauncher.startWizard(WizardLauncher.java:160) at com.mathworks.wizard.WizardLauncher.start(WizardLauncher.java:75) at com.mathworks.wizard.AbstractLauncher.launch(AbstractLauncher.java:27) at com.mathworks.wizard.AbstractLauncher.launchStandalone(AbstractLauncher.java:18) at com.mathworks.professionalinstaller.Launcher.main(Launcher.java:21) Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:106) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:758) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754) at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89) at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89) at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:95) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84) at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111) at com.google.inject.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84) at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111) at com.google.inject.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at com.google.inject.Scopes$1$1.get(Scopes.java:54) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:758) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754) at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89) at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89) at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:95) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at com.google.inject.Scopes$1$1.get(Scopes.java:54) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84) at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111) at com.google.inject.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at com.google.inject.Scopes$1$1.get(Scopes.java:54) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:758) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:804) at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754) ... 6 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:101) ... 54 more Caused by: com.mathworks.instutil.JNIException: java.lang.UnsatisfiedLinkError: Can't load library: /tmp/mathworks_7417/bin/glnxa64/libinstutil.so at com.mathworks.instutil.NativeUtility.loadNativeLibrary(NativeUtility.java:39) at com.mathworks.instutil.NativeUtility.(NativeUtility.java:24) at com.mathworks.instutil.DisplayPropertiesImpl.(DisplayPropertiesImpl.java:10) at com.mathworks.wizard.WizardModule.provideDisplayProperties(WizardModule.java:67) ... 59 more Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /tmp/mathworks_7417/bin/glnxa64/libinstutil.so at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1842) at java.lang.Runtime.load0(Runtime.java:795) at java.lang.System.load(System.java:1061) at com.mathworks.instutil.NativeUtility.loadNativeLibrary(NativeUtility.java:37) ... 62 more Finished ` I have tried to 1- re-install java run-time 6 and then 7. 2- pass the java-path to the install with : -javadir 3- use the force to install on 32 bits as : sh install -glnx86 -v -javadir /usr/lib/jvm/java-7-openjdk-i386/jre But it seems none of them have worked so far. any ideas ??

    Read the article

  • ASP.NET MVC AND TOOLBOX

    - by imran_ku07
       Introduction :           ASP.NET MVC popularity is not hidden from the today's world of web applications. One of the great thing in ASP.NET is the separation of concerns, in which presentation views are separate from the business or modal layer. In these views ASP.NET MVC provides some very good controls which generate commonly used HTML markup fragments using a shorter syntax. These presentation views are familiar to web forms developers. But a pain for developers to use these controls is that they need to type these helpers controls every time when they need to use a control, because they are more familiar to drag and drop controls from ToolBox. So in this article i will use a cool feature of Visual Studio that allows you to add these controls in ToolBox once and then, when needed, just drag and drop controls from ToolBox, very similar like in web forms.   Description :            Visual Studio ToolBox is rich enough that allows you to store code and HTML snippets in ToolBox. All you need is select the HTML Helper and then simply drag and drop into Toolbox. Repeat this Procedure for every HTML Helper in ASP.NET MVC.             When you need to use a HTML Helper, you can drag and drop it from ToolBox and become happy with drag and drop programming. Summary :              In this article you see that how Visual Studio helps you to drag and drop HTML snippets from Design view to toolbox. This is one of the coolest features in Visual Studio.

    Read the article

  • How do I install MATLAB R2012a?

    - by Mehdi
    I have downloaded MATLAB R2012a for Unix platform and i want to install it on my ubuntu 11.10. To install i try this command: /<matlab_installation_file_directory>/install and it says: install: missing file operand According to it's manual i must give it an input file, So i create an input file like this to install in 'Stand Alone' mode: destinationFolder=usr/local/R2012a fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx agreeToLicense=yes outputFile=/tmp/mathworks_usr.log mode=interactive activationPropertiesFile=home/.../lic_standalone.dat Acctually i'm not sure in "activationPropertiesFile" field what file is required, so i supposed it requires license file. I saved this file as txt format in the same directory which installation files are. Then i tried this command: install -inputFile my_input_file.txt and it gets this error: install: invalid option -- 'i' I know there is some helps in other websites and also some questions here about this topic, but i can't figure out what's the problem, Please help me, i'm a real noob on linux . Thank you guys

    Read the article

  • Out of memory on MATLAB

    - by Eric Sánchez
    I'm trying to run a script on matlab_2011a, which calculate same means for a climatology of 50 years. When I started to run the script for all the years it worked fine until the iteration 20th, and then appeared the message: Out of memory. Type HELP MEMORY for your options. Then I used clear v1 v2 v3 ... to clear all the variables inside the function, also i used clear train because i saw it in another forum, and these with the modifications or not, I run again the script (since the 21th iteration), and the result is the same message, but curiously sometimes it run a year and then stop. Any ideas about solving this problem?, what I have to clean to run correctly? (in this matlab version there's not the command memory which maybe could help me).

    Read the article

  • How can I launch Matlab 2012 on Ubuntu 12.04?

    - by Mattia
    I have a problem with the MATLAB 2012 installation. After having installed it using alt+f2 and having used gksudo nautilus I have installed MATLAB in the correct folder which is: /usr/local/MATLAB/R2012a Then I inserted the license and the window told "activation complete" or something like that. This made me happy, but only for a while because as soon as I try to search for Matlab within the applications I cannot find it and neither if I try to run matlab into terminal it says: command not found Can someone help me!? Tanks in advance!

    Read the article

  • MATLAB interview questions?

    - by Shane
    I programmed in MATLAB for many years, but switched to using R exclusively in the past few years so I'm a little out of practice. I'm interviewing a candidate today who describes himself as a MATLAB expert. What MATLAB interview questions should I ask? Some other sites with resources for this: "Matlab interview questions" on Wilmott "MATLAB Questions and Answers" on GlobaleGuildLine "Matlab Interview Questions" on CoolInterview

    Read the article

  • C# app fails to load Matlab DLL when running from a shared drive?

    - by jg
    I have a C# .NET 2.0 program that calls a Matlab .dll file that I created using Matlab Builder for .NET. This Matlab .dll file is a wrapper for a m file function that I need to call from my C# program. Everything works fine when I run this app from my local drive. However once I copy the app to a shared drive the Matlab dll fails when it's first loaded. I setup caspol to allow .NET programs to run from shared drives. Does anyone know what could cause this problem or a tool that I could use to easily figure out what the problem is? Thanks.

    Read the article

  • matlab on laptop [closed]

    - by bill
    I would to get any opnion regarding which of the two laptop configuration is best for running Matlab with (by running matlab I do not mean graphic simulation): HP EliteBook 8570p - Intel® Core™ i5-3210M (2.50 GHz, 3 MB L3 cache, 2 cores) Chipset Mobile Intel® QM77 Express 4 GB 1600 MHz DDR3 SDRAM OR HP g6-2090ej - 2.1 GHz Intel Core i7-3612QM 6 MB L3 cache 8 GB DDR3 The second one is i7 but the first one is the Elitbook series which is a "workstation". Which will be the best for Matlab computation (no graphic simulation only computing matrix etc.)?

    Read the article

  • Vectorization of matlab code for faster execution

    - by user3237134
    My code works in the following manner: 1.First, it obtains several images from the training set 2.After loading these images, we find the normalized faces,mean face and perform several calculation. 3.Next, we ask for the name of an image we want to recognize 4.We then project the input image into the eigenspace, and based on the difference from the eigenfaces we make a decision. 5.Depending on eigen weight vector for each input image we make clusters using kmeans command. Source code i tried: clear all close all clc % number of images on your training set. M=1200; %Chosen std and mean. %It can be any number that it is close to the std and mean of most of the images. um=60; ustd=32; %read and show images(bmp); S=[]; %img matrix for i=1:M str=strcat(int2str(i),'.jpg'); %concatenates two strings that form the name of the image eval('img=imread(str);'); [irow icol d]=size(img); % get the number of rows (N1) and columns (N2) temp=reshape(permute(img,[2,1,3]),[irow*icol,d]); %creates a (N1*N2)x1 matrix S=[S temp]; %X is a N1*N2xM matrix after finishing the sequence %this is our S end %Here we change the mean and std of all images. We normalize all images. %This is done to reduce the error due to lighting conditions. for i=1:size(S,2) temp=double(S(:,i)); m=mean(temp); st=std(temp); S(:,i)=(temp-m)*ustd/st+um; end %show normalized images for i=1:M str=strcat(int2str(i),'.jpg'); img=reshape(S(:,i),icol,irow); img=img'; end %mean image; m=mean(S,2); %obtains the mean of each row instead of each column tmimg=uint8(m); %converts to unsigned 8-bit integer. Values range from 0 to 255 img=reshape(tmimg,icol,irow); %takes the N1*N2x1 vector and creates a N2xN1 matrix img=img'; %creates a N1xN2 matrix by transposing the image. % Change image for manipulation dbx=[]; % A matrix for i=1:M temp=double(S(:,i)); dbx=[dbx temp]; end %Covariance matrix C=A'A, L=AA' A=dbx'; L=A*A'; % vv are the eigenvector for L % dd are the eigenvalue for both L=dbx'*dbx and C=dbx*dbx'; [vv dd]=eig(L); % Sort and eliminate those whose eigenvalue is zero v=[]; d=[]; for i=1:size(vv,2) if(dd(i,i)>1e-4) v=[v vv(:,i)]; d=[d dd(i,i)]; end end %sort, will return an ascending sequence [B index]=sort(d); ind=zeros(size(index)); dtemp=zeros(size(index)); vtemp=zeros(size(v)); len=length(index); for i=1:len dtemp(i)=B(len+1-i); ind(i)=len+1-index(i); vtemp(:,ind(i))=v(:,i); end d=dtemp; v=vtemp; %Normalization of eigenvectors for i=1:size(v,2) %access each column kk=v(:,i); temp=sqrt(sum(kk.^2)); v(:,i)=v(:,i)./temp; end %Eigenvectors of C matrix u=[]; for i=1:size(v,2) temp=sqrt(d(i)); u=[u (dbx*v(:,i))./temp]; end %Normalization of eigenvectors for i=1:size(u,2) kk=u(:,i); temp=sqrt(sum(kk.^2)); u(:,i)=u(:,i)./temp; end % show eigenfaces; for i=1:size(u,2) img=reshape(u(:,i),icol,irow); img=img'; img=histeq(img,255); end % Find the weight of each face in the training set. omega = []; for h=1:size(dbx,2) WW=[]; for i=1:size(u,2) t = u(:,i)'; WeightOfImage = dot(t,dbx(:,h)'); WW = [WW; WeightOfImage]; end omega = [omega WW]; end % Acquire new image % Note: the input image must have a bmp or jpg extension. % It should have the same size as the ones in your training set. % It should be placed on your desktop ed_min=[]; srcFiles = dir('G:\newdatabase\*.jpg'); % the folder in which ur images exists for b = 1 : length(srcFiles) filename = strcat('G:\newdatabase\',srcFiles(b).name); Imgdata = imread(filename); InputImage=Imgdata; InImage=reshape(permute((double(InputImage)),[2,1,3]),[irow*icol,1]); temp=InImage; me=mean(temp); st=std(temp); temp=(temp-me)*ustd/st+um; NormImage = temp; Difference = temp-m; p = []; aa=size(u,2); for i = 1:aa pare = dot(NormImage,u(:,i)); p = [p; pare]; end InImWeight = []; for i=1:size(u,2) t = u(:,i)'; WeightOfInputImage = dot(t,Difference'); InImWeight = [InImWeight; WeightOfInputImage]; end noe=numel(InImWeight); % Find Euclidean distance e=[]; for i=1:size(omega,2) q = omega(:,i); DiffWeight = InImWeight-q; mag = norm(DiffWeight); e = [e mag]; end ed_min=[ed_min MinimumValue]; theta=6.0e+03; %disp(e) z(b,:)=InImWeight; end IDX = kmeans(z,5); clustercount=accumarray(IDX, ones(size(IDX))); disp(clustercount); Running time for 50 images:Elapsed time is 103.947573 seconds. QUESTIONS: 1.It is working fine for M=50(i.e Training set contains 50 images) but not for M=1200(i.e Training set contains 1200 images).It is not showing any error.There is no output.I waited for 10 min still there is no output. I think it is going infinite loop.What is the problem?Where i was wrong?

    Read the article

  • No proper kmeans clustering of images in matlab

    - by user3237134
    I am having 1200 face images in my training set.There are 2989 test face images. I am using eigen faces (PCA) for feature extraction. I am using kmeans clustering. Source code I tried: IDX = kmeans(z,5); clustercount=accumarray(IDX, ones(size(IDX))); disp(clustercount); Problem: Images are not clustered properly. Same faces should be clustered. But different faces are being clustered. Questions: Should I have to use still more face images for training? How accuracy of clustering can be achieved? What is the solution?

    Read the article

  • -ln links to wrong file

    - by user289075
    I've just installed matlab and want to be able to call it from the terminal. It works fine when I explicitly call it from its directory. I cd to /usr/local/bin and type sudo ln -s /usr/local/MATLAB/R2012a/bin/matlab matlab when I then type "matlab" in the terminal, I get the error message "bash: /media/OS/MATLAB/bin/matlab: No such file or directory" I have no idea why it's trying to call matlab from /media. I've tried deleting the file from usr/local/bin but when I create it again the same thing happens. Any help would be very much appreciated.

    Read the article

  • Calling matlab callback/function handle from Java

    - by jakob
    How do I pass a matlab function handle to a Java object and invoke it from within Java (that is, I want Java to tell matlab when it is ready with a calculation). I am trying to use the com.mathworks.jmi.Matlab class for evaluating Matlab expressions in the Java object, but I can't see how to 1) transfer the callback funcktion handle to Java, and 2) invoke it from Java possibly using the com.mathworks.jmi.Matlab class. Thanks, jakob

    Read the article

  • MATLAB Builder NE (.NET Assembly) Data type question

    - by Brett
    Hi coders, I am using MATLAB Builder NE (MATLAB's integrated .NET assmebly builder), but I am having an issue with data types. I have compiled a small, very simple, function in matlab and build it for .NET. I am able to call the namespace and even the function just fine. However, my function returns a value, and MATLAB defaults to returning it as an "object[]" data type. However, I know that the value is an integer, but I can't figure out how to cast it. My MATLAB function looks like this: function addValue = Myfunction(value1, value2) addValue=value1+value2; end Pretty simple right? And then in .NET I can call it as: xClass.addValue (1, 3, 4); where xClass is the name of the MATLAB built class but when I try: int x = xClass.addValue (1, 3, 4); C# errors out. Typical .NET casting (int) doesn't work. The compiler states it cannot convert object[] to int. Does anyone have experience with the .NET builder in MATLAB that can help me with this? It is really throwing me for a loop. I have scanned through most of the MATLAB BUILDER doc (484 pages!) with zero help. Thank you, Brett

    Read the article

  • using Java enums or public static fields in MATLAB

    - by Jason S
    I'm wondering how in MATLAB you can get a reference to a Java enum or static public field. In MATLAB, if you are trying to use Java objects/methods, there are equivalents to Java object creation / method call / etc.: Java: new com.example.test.Foo(); MATLAB: javaObject('com.example.test.Foo'); Java: com.example.test.Foo.staticMethod(); MATLAB: javaMethod('staticMethod', 'com.example.test.Foo'); Java: SomeEnum e = com.example.test.SomeEnum.MY_FAVORITE_ENUM; MATLAB: ????? Java: int n = com.example.test.Foo.MAX_FOO; MATLAB: ?????

    Read the article

  • Communication between java server and matlab client

    - by user272587
    I'd like to establish a server(Java)/client (Matlab) communication using socket. They can send messages to each other. An example shows how to do this in Java server and Java client, http://java.sun.com/docs/books/tutorial/networking/sockets/clientServer.html. When I try to rewrite the client part in Matlab, I only can get the first message that the Java server sends and display it in the Matlab command window. When I type a message in the Matlab command window, I can't pass it to the Java Server. Jave code: kkSocket = new Socket("localhost", 3434); Matlab equivalent: kkSocket = Socket('localhost', 3434); Java code for client: out = new PrintWriter(kkSocket.getOutputStream(), true); in = new BufferedReader(new InputStreamReader(kkSocket.getInputStream())); What would be a Matlab equivalent for this? Thanks in advance.

    Read the article

  • SciPy interp1d results are different than MatLab interp1

    - by LMO
    I'm converting a MatLab program to Python, and I'm having problems understanding why scipy.interpolate.interp1d is giving different results than MatLab interp1. In MatLab the usage is slightly different: yi = interp1(x,Y,xi,'cubic') SciPy: f = interp1d(x,Y,kind='cubic') yi = f(xi) For a trivial example the results are the same: MatLab: interp1([0 1 2 3 4], [0 1 2 3 4],[1.5 2.5 3.5],'cubic') 1.5000 2.5000 3.5000 Python: interp1d([1,2,3,4],[1,2,3,4],kind='cubic')([1.5,2.5,3.5]) array([ 1.5, 2.5, 3.5]) But for a real-world example they are not the same: x = 0.0000e+000 2.1333e+001 3.2000e+001 1.6000e+004 2.1333e+004 2.3994e+004 Y = -6 -6 20 20 -6 -6 xi = 0.00000 11.72161 23.44322 35.16484... (2048 data points) Matlab: -6.0000e+000 -1.2330e+001 -3.7384e+000 ... 7.0235e+000 7.0028e+000 6.9821e+000 SciPy: array([[ -6.00000000e+00], [ -1.56304101e+01], [ -2.04908267e+00], ..., [ 1.64475576e+05], [ 8.28360759e+04], [ -5.99999999e+00]]) Any thoughts as to how to can get results that are consistent with MatLab?

    Read the article

  • How to load an image in matlab from java

    - by Ian
    Basically I am trying to create a little program that will allow me to make calls in matlab from a jave GUI It's mainly going to be used for image manipulation and deblurring but I am struggling to find a way that will effectively give me full matlab control from the java end I am hoping to have it work like so: { //create matlab execution call String loadImage = " image1 = imread ('imageOnComputer.jpg'); "; //send instruction to matlab and save the path to it so java can //use the newly created variable resultingVariablePath = java.sendInstructionToMatlab(loadImage); //display on the screen java.displayImage(resultingVariablePath); } Basically I am just trying to find out if there is a plugin for matlab (or some java package) that will grant you (pretty much) full control over matlab.

    Read the article

  • Can I distribute my MATLAB program as open source?

    - by yuk
    I know, the general answer will be yes, but here is my situation. I got a plotting function from one MATLAB's toolbox and modified its m-file to draw what I need. Eventually this function became a part of program I would like to distribute as an open source (or under other license). Can I do this? Well, may be it was not wise to create a function in such a way, but I didn't think about distribution at that time. The function still depends on other functions in this toolbox, so a potential user supposed to have a license for it. Any thoughts, recommendations? Have you ever modified MATLAB's m-files directly?

    Read the article

  • 'ttest' function not working in Matlab

    - by Harpreet
    When I am using this statement in Matlab in my computer then its giving error as follow: [h,p,ci]=ttest(randn(100,1),0.1) Error: ??? Error using ==> nanmean Too many input arguments. Error in ==> ttest at 104 xmean = nanmean(x,dim); However if I use the same statement in Matlab in another computer, then its working fine and giving results. Do you know what could be the problem? I am posting this question here suspecting it to be some software problem with Matlab. Correct me if I am wrong.

    Read the article

  • Why Matlab in screen in Linux on PuTTY terminates itself after closing PuTTY session?

    - by Karl
    I connected to a linux server with PuTTY and start a screen session, and start matlab with: matlab -nodesktop Then, I run my matlab code as usual. The code will run for hours. So to test whether screen works, I start another PuTTY session and run top. Then, I close PuTTY session with still-running Matlab (top shows Matlab at 100% CPU usage) in screen. To my surprise, my Matlab process vanished after I close the aforementioned session. I've tried this a few times, and it seems the same thing happened. screen -ls shows that my screens are there but detached. top also shows that my matlab is not there. What might be the possible cause of this? Doesn't screen normally should keep on running even I terminate my PuTTY session?

    Read the article

  • X11 not sending windows to remote computer matlab

    - by MZimmerman6
    I am trying to set up my home desktop, running OS X Mountain Lion, to basically do a bunch of grunt work for me remotely. I have set up ssh, and am able to remotely control the computer fine, but the issue comes in when I try to run X11 apps, like MATLAB, remotely and get windows to pop up. Every time I try to bring up a new window it either opens that window on the remote computer (not the one I am using to control it), or it tells me it can't find a display. here is how I am setting up my ssh assume my matlab alias is set up properly, which it is. ssh -X [email protected] matlab -nodesktop figure; This will open the window on the computer I am SSHing into, and not on the remote one. Basically I want that window to open on the computer I am remoting from. I changed my SSH X11Forwarding and stuff to be yes in ssh_config and sshd_config. Any other suggestions?

    Read the article

  • Add Matlab to main menu

    - by Tim
    I was trying to add the installed matlab to the menu of Applications under Ubuntu 10.10. I clicked System-Preference-Main Menu - Programming - New Item, where I input the Matlab file .../MatlabR2010b/bin/matlab as the command, and selected the type to be "Application". Then I finished. But when i click the item in the menu of Applications, the Matlab icon shows up a few seconds and then nothing else happens. If I select the type to be "Application in Terminal" in the last step of adding Matlab to the menu of Applications, then when I click the item in the menu of Applications, there will be firstly a terminal window and then the Matlab command window. So I was wondering how to solve the problem of Matlab not starting when the type has been selected to be "Application"? Also is there a way to eliminate the terminal appearing when the type has been selected to be "Application in Terminal"? Thanks!

    Read the article

  • Programmatically configure MATLAB

    - by Richie Cotton
    Since MathWorks release a new version of MATLAB every six months, it's a bit of hassle having to set up the latest version each time. What I'd like is an automatic way of configuring MATLAB, to save wasting time on administrative hassle. The sorts of things I usually do when I get a new version are: Add commonly used directories to the path. Create some toolbar shortcuts. Change some GUI preferences. The first task is easy to accomplish programmatically with addpath and savepath. The next two are not so simple. Details of shortcuts are stored in the file 'shortcuts.xml' in the folder given by prefdir. My best idea so far is to use one of the XML toolboxes in the MATLAB Central File Exchange to read in this file, add some shortcut details and write them back to file. This seems like quite a lot of effort, and that usually means I've missed an existing utility function. Is there an easier way of (programmatically) adding shortcuts? Changing the GUI preferences seems even trickier. preferences just opens the GUI preference editor (equivalent to File - Preferences); setpref doesn't seems to cover GUI options. The GUI preferences are stored in matlab.prf (again in prefdir); this time in traditional name=value config style. I could try overwriting values in this directly, but it isn't always clear what each line does, or how much the names differ between releases, or how broken MATLAB will be if this file contains dodgy values. I realise that this is a long shot, but are the contents of matlab.prf documented anywhere? Or is there a better way of configuring the GUI? For extra credit, how do you set up your copy of MATLAB? Are there any other tweaks I've missed, that it is possible to alter via a script?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >