I've been learning a lot about machine learning (mostly clustering and regressions), but when I've looked into programming libraries/environments, I've found "production ready" ones to be few and far between. What I mean by "production ready" is that it could be incorperated into a product, not just used a tool to fool around with in order to find some relationships. For instants, Pandora is probably a good example of a company that uses some algorithm (I would guess logistical regression, but I don't really know) to compute values from code. In Java, things like Weka and RapidMiner seem to include … |
+0 forum
4 | ||

Hello! I'm trying to transform working Python code to Matlab code. It's Simpson's rule. But MatLab code is not working. What should I change for in this code? Python: from math import sin def f(x): return ((0.6369)*sin(sin(x))*sin(x)) def method_simpson_compost(f,a,b,n): h = (float(b)-a)/n i = 0 fks = 0.0 while i<=n: xk = a+i*h if i==0 or i==n: fk = f(xk) elif i%2 == 1: fk = 4*f(xk) else: fk = 2*f(xk) fks += fk i += 1 return (h/3)*fks print method_simpson_compost(f, 0, 1.57, 10) MatLab code: file-function "f.m": function func = f(z, x) f = ((0.6369).*sin(z.*sin(x)).*sin(x)) file-function "s.m": function simpson … |
+0 forum
3 | ||

I applied neural network toolbox to create a multilayer feedforward network. The data is a huge csv file which maps to three outputs. data = load('Train.csv'); Input= data(1:31012,1:40); Output=data(1:31012,41); %net = newff(minmax(Input),[1000,1000,1000]); net = feedforwardnet(10,'trainlm'); view(net) y = net(Input); perf = perform(net,y,Output) but this code always gives this - "Empty state-space model." What am I doing wrong? |
+0 forum
0 | ||

I have an application thats has been coded in C#. After build it generates a standalone dll file and the exe file. I want to use this code in Matlab. I found out from [this](http://www.mathworks.co.uk/help/matlab/matlab_external/using-a-net-object.html#bshoa6b-1) page that I can load the C# classes or codes into Matlab. dll_in_matlab = NET.addAssembly('location to the dll file) I have the code and the application buty unfortunately I do not understand C# at all. So after using this command I was able to see a .NET object in my workspace and this is what I got for its properties and its classes: evmaps = … |
+0 forum
0 | ||

Here is the mex code I wrote to read in a tab-delimited file. The mex file got created but it causes my MATLAB to end abruptly and give the following error. Can anyone help me where I am going wrong? Please let me know if any further information is required Abnormal termination: Segmentation violation #include "mex.h" #include "matrix.h" #include <stdio.h> #include<string.h> #include<stdlib.h> void mexFunction(int nlhs,mxArray *plhs[],int nrhs,const mxArray *prhs[]) { FILE *ptr_file; const char **field_names; /* pointers to field names */ char *buf[1024]; char *temp[20]; int count; int i, j, k, l; int date_field, mva_field, qc_load_field, air_field, qc_air_field, oil_field, qc_oil_field, … |
+0 forum
1 | ||

I am unable to convert my C file to mex file. Here is the C file I wrote to read in a tab-delimited file. The C program in running, but I am not able to successfully convert it to a mex file. I have also pasted the mex file I tried. Can anyone please tell me where is it that I am going wrong? I think I am making a mistake in declaring the structure. Also after declaring the output structure plhs[0], how do I retrieve it in MATLAB with desired structure elem? C CODE: #include <stdio.h> #include<string.h> #include<stdlib.h> #define … |
+0 forum
1 | ||

I am trying to plot a graph in matlab using c++. But the matlab is only giving me an empty graph. void portfolio::viewGraph() { double value[20]; //store portfolio value double time[20]; //store time int i=0,j=1; double cash,p; ifstream in_file("transactionhistory.txt", ios::in); string c; while(in_file>>cash>>p>>c>>c>>c>>c>>c) { value[i]=(p+cash); cout<<p<<endl; time[i]=j; cout<<time[i]<<endl; i++; j++; } Engine *ep; if (!(ep = engOpen(NULL))) { return ; } int t=20; mxArray *A; // assume a gets initialized, all values A=mxCreateDoubleMatrix(1,i, mxREAL); memcpy((void *)mxGetPr(A), (void *)value, sizeof(double)*i); engPutVariable(ep, "value", A); mxArray *B; // assume a gets initialized, all values B=mxCreateDoubleMatrix(1,i, mxREAL); memcpy((void *)mxGetPr(B), (void *)time, sizeof(double)*i); engPutVariable(ep, "time", … |
+0 forum
0 | ||

Hi.I have an image(A) and encrypted image(B) .I want to find correlation coefficient for(Horizontal,Vertical,Diagonal) A(~1)and for B(~0)is there any function in matlab for this ?I know corr2 is for calculating the correlation coefficient for two images.but for one image? |
+0 forum
3 | ||

1. Given a length of wire P units long, where P is an integer, it is possible in some cases to bend the wire into an isosceles triangle(with two sides equal) where the lengths of all the sides are also integers. For example a wire of length P = 3 units can be bent into an isosceles triangle, while a wire of length P = 4 can not. For some lengths there is more than one isosceles triangle with integer length sides. Of those isosceles triangles with integer length sides some will have an area which is also an integer, … |
+0 forum
1 | ||

I am in a small doubt of how to proceed to the next stage. 1. I have used im2col which basically turned gray-scale image into vector. 2. I have used the function vector quantization lbg algorithm which gave the VQ codebook as the output. I understand that the image I have used to create the codebook is the training image. So here's my doubt: **How and where am I going to provide the test image in order to test the codebook created from the training image? ** What are your suggestions? |
+0 forum
0 | ||

Hello all!! I am new to MATLAB and am trying to do multidimensional scaling for some data I have. It is just a 24x24 correlation matrix and I keep getting an error message that it is not a square matrix, but it is!! I don't understand :/ I've been following the MDS tutorial here (http://www.mathworks.com/help/stats/multidimensional-scaling.html#briu08r-2) and just replaced the map example numbers with my numbers. I also added some more titles to 24 since the city example only had 10. But I get this error! I made sure I had a ; after each of the 24 rows, so it … |
+0 forum
0 | ||

I have a variable x which varies from -160 to 160 through steps of 10. `x = -160:10:160;` I have a matrix T1 which is of the form ` cos(x) 0 +sin(x) 0.00; sin(x) 0 -cos(x) 0.00; 0.0000 1 0.00000 0.67; 0.0000 0 0.00000 1.00 ` How can that be represented in Matlab ? I have seen that setting T1 to the following and displaying T1 produces only the `sin` and `cos` terms in the matrix,but not the zeroes. `T1 = [cos(x) 0 sin(x) 0;sin(x) 0 -cos(x) 0];` How do I get this done ? |
+0 forum
0 | ||

i am making program to read text by convert image of text into text but i have problem in the out because the text not in line but in column and i can't detect space between words . the code in matlab: load 'Charachters.mat'; str ={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9','0',' '}; f = imread('1.PNG'); imshow( f ) bwf=bwareaopen(imbw,55); imshow(bwf) [tags num]=bwlabel(bwf); improps=regionprops(tags); for i=1:num z = imcrop(bwf,[improps(i).BoundingBox(1),improps(i).BoundingBox(2),improps(i).BoundingBox(3),improps(i).BoundingBox(4)]); w=imresize(z,[90 45]); for j=1:36 c(j)= corr2(w,Charachters{j}); end cc = find (c == max(c)); r=[str{cc}]; disp(r) end can you help me? |
+0 forum
0 | ||

hi i need help in design scheduling in wimax network using matlab. is there anyone can help me? |
+0 forum
0 | ||

hi, is it possible to collaborate matlab and c#? if yes..how do you do it? and will the application be able to run on windows phone 7? |
+0 forum
2 | ||

Hi Everyone Re; Help with MATLAB...basic stuff Let me start with..."What the heck have I let myself in for???? " I'm 43 years old Haven't studied anything related to math in 10+ years. Enrolled in University via distance education in Australia. I live in a small town in Queensland's outback. I have asked around town...only around 1000 people...no one knows anything regarding MATLAB. I have watched the videos on the www.mathworks sites over and over....went through the textbook and studyguide over and over. I am supposed to be able to do this after chapter 3...but I am really struggeling. I … |
+0 forum
8 | ||

i have a **java program** and it call **matlab exe file** ,but i have a problem in run time it is so so slow . i need a help in how to make this faster, i will be grateful for any help...plzzzzzz rply |
+0 forum
1 | ||

I am writing a m-file that simply takes in a picture of a board with 27 LEDS on it and simply tells you which LED is lit up. My problem is with the calibration of the m-file. I am trying to use [x,y] = ginput(27) to have the user click the leds on the image so that matlab knows their cooridinates, but the problem with that is when i click the LEDs I sometimes get numbers with decimals and ginput requires integers. So using floor or round I can make it an integer but doing so moves the location to … |
+0 forum
0 | ||

Hello, I am having difficulty writing a function file that produces an echo to a .wav recording I made. How do you create one? Thanks! |
+0 forum
0 | ||

Hi can anyone help me I am using the following code to import data from spread sheet file and plot data- everything working perfect,it plotting one set of data here [B]v=xlsread('table.zn','B2:B20') plot(fliplr(v))[/B] the only thing- I need to plot 2 various set of data on same graph e.g I want to plot colunm [B]B2:B20 and C2:C20[/B] on same graph Thank you |
+0 forum
1 | ||

I am developing the Django application which runs the Matlab code and create some txt and png files on the server.when I run these below python command on server, it works fine but when I try to run from the server (it is coded in Viewspy).It shows file is updated.(from timestamp).But when I open the file its not updated.I checked error log and access log.But they is no error in them. [CODE]os.chdir('/var/www/djangoapps/practicum/LineShapeKin_Simulation_4.1.4/LineShapeKin_Simulation_4.1/Python/') os.system('/usr/local/MATLAB/R2011b/bin/matlab -nojvm -nosplash -nodisplay -r runscript') [/CODE] |
+0 forum
0 | ||

I am trying to color some alphabets in a string based on input alphabet given. suppose string: [B]AUSTRALIA[/B] INPUT: [B]A[/B] OUTPUT: [B][COLOR="Red"]A[/COLOR]USTR[COLOR="red"]A[/COLOR]LI[COLOR="red"]A[/COLOR][/B] Can anyone suggest me how to achieve it ? As m new to this. |
+0 forum
0 | ||

Hi, I'm using Matlab 2011a and VS 2010. I have to call Matlab functions in my project. The problem is that I can't seem to find a solution works with my Matlab version. Has anyone succesfuly integrated Matlab 2011a with c#? |
+0 forum
2 | ||

Dear all, Perhaps a bit of random one, but does anyone have an experience of using the surface fitting toolbox in MATLAB? My specific problem is that I have fitted a polynomial to a surface which is a good fit in this instance (r squared >0.99); fitting using interpolant will give a better fit on more complicated data, but how can I obtain the fitting parameters so that I can use the fit outside of MATLAB? Cheers. |
+0 forum
0 | ||

[B]Product[/B]: [B][COLOR="Red"]Matlab, Simulink[/COLOR][/B] [B]Problem Statement[/B]: Complex feedback loops implying usage of Unit Delay Block. At certain simulation frame calculation of required values for test generation is becoming complex. Is there a way to override the Unit Delay block output without changing the model (as I am not allowed to do so) rather by using set_param. I am using cvdata/sim/cvhtml combination for my simulation. I tried extracting all the assocaited aparameter sfor Unit Delay using [CODE]get_param(gcb,'ObjectParameters');[/CODE] but was not able to find a suitable parameter to use owing to lack of help information on each parameters. Kindly help me out if … |
+0 forum
0 | ||

Hello all, I'll hopefully be attending a cognitive neuroscience PhD program next fall and I'd like to learn some programming beforehand (having programming skills helps for lots of neuroimaging labs). Labs I've worked in used UNIX, MATLAB, and E-Prime (visual basic) and I'd really like to improve my knowledge before I go to graduate school. I'm working on learning UNIX and Visual Basic with decent success but as far as C++, I'm lost. I know the book by Eckels (thinking in C++) is highly recommended but it just seems too advanced for me. I get overwhelmed with the material quickly … |
+0 forum
5 | ||

I am trying to solve a system of 5 equations in 5 unknowns. I am new to the Matlab language. I consulted the documentation and decided that the best way of doing this was to use the solve() function. However, this function does not appear to work properly for 5 unknowns. It is an electrical problem, and I am trying to solve for 5 currents, i1, i2, i3, i4, and i5. However, the function does not recognize v2 as a constant attempts to solve for it, neglecting i5. The code is as follows: [CODE]v2 = 1; syms i1 i2 i3 … |
+0 forum
0 | ||

Hello, I have a problem with the atan2 function. I have 2 programs, one in C and one in Matlab. Both have an identical implementation. My problem is that I am getting occasionally different values from the atan2 function in C and Matlab. For instance: x=0.29695007709080329 y= -0.96764419257510348 Matlab atan2= 2.8438364863237604 C atan2= 2.8438364863237608 So only the last digit is different (and not in all cases), but unfortunately, I would need the values to be identical. Do you have any ideas it might be like this and how can I solve it? Thank you. |
+0 forum
6 | ||

Hows it going guys, I just had a question, which I think is simple, but I cant seem to get my head around to the solution. I have a Signals Processing lab coming up on modulation and demodulation. Anyway to cut to the chase, one part of the system requires me to model a rectifier, which in layman's term, is a device that makes any part of a wave that is less than zero, equal zero. For signal x I can write x(x<0)=0 However This model of the rectifier also adds attenuation of +6db To my wave. I was just … |
+0 forum
0 | ||

Hi all, I am a student and would like to know where i can get a free download of matlab. Is that possible anywhere? |
+0 forum
2 |

The End.