Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

14 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

14 years ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

14 years ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

14 years ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

14 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

14 years ago

Answered
Writing to Excel
Hi, seems more like an EXCEL issue rather than ML. Did you try to write an excel file to that folder via COM outside of MATLA...

14 years ago | 0

Answered
Writing PDF files - problem with MSWord automation in compiled executable
Hi, please make sure that you take care of the path correctly: <http://blogs.mathworks.com/loren/2008/08/11/path-managemen...

14 years ago | 0

| accepted

Answered
print mxArray type.
Okay, ML Compiler DLL. There is no print function available in C for the mxArray data type. One thing I use quite often in such ...

14 years ago | 0

| accepted

Answered
print mxArray type.
Hi, first of all, mexcallmatlab can be called from a mex file only. Since Mohammed writes an exe, this won't work. Why ar...

14 years ago | 0

Answered
jar cf jar-file input-file equivalent in Matlab
Hi, have a look at the system comamnd: <http://www.mathworks.com/help/releases/R2011b/techdoc/ref/system.html> Basicall...

14 years ago | 0

| accepted

Answered
Mex & Cuda
Hi, I am not a CUDA expert but as far as I can tell the reason for this behavior is the way you call vecAdd: vecAdd<<< N...

14 years ago | 1

Answered
how change the size of font?
Hi, goto File -> Preferneces -> Fonts in MATLAB and increase the font size.

14 years ago | 2

| accepted

Answered
textscan fopen
Hi, I created a file (data.txt) which contains the following lines AXY.P,20050101,09:35:01.202,quant,^ AXY.P,20050101,09:3...

14 years ago | 0

Answered
how to install Indeo codec?
Hi, depends on your OS and MATLAB bitness. In the case you are suing 64bit OS you won't be able to install this codec since t...

14 years ago | 0

Answered
To split a matrix into equal parts.
Hi, still the same answer as before: a = reshape(1:36,6,6) b = a(2:3:end,2:3:end)' So when usingg 128x128 matrix: a...

14 years ago | 0

| accepted

Answered
To split a matrix into equal parts.
Hi, why reshaping? When you know which elements you like, use linear indexing. This example pics up the elemtents (16,16), (48,...

14 years ago | 0

| accepted

Answered
Saving the parameters returned from mex
Hi, the problem is that you use the variable data for two different things. To store the overall data and as returnvalue of tha...

14 years ago | 0

Answered
how to change each cell color in a uitable
Update: Starting in R2019b you can use the uistyle, addStyle, and removeStyle functions. f = uifigure; uit = uitable(f, Dat...

14 years ago | 10

| accepted

Answered
reading the file using input function
Hi, you can do something like: strrep(fileread('new.txt'),',',' ')

14 years ago | 0

Answered
How to rebuild a dll file for C# from an available dll file used in Excel addin?
Hi, I doubt this will work since BUILDER EX generated DLL can be called from EXCEL only (checked / requiered inside of that g...

14 years ago | 0

Answered
how to translate this macro
Hi, in general some pseudo code which can be run anywhere would be for(i=0;i<=x2-x1;i++) err[i] = (dd_y[i+x1] - yi[i...

14 years ago | 0

Answered
Using least square method , determining unknown values ?
Hi, is this even doable with normal least square? This is a nonlinear problem. Normally you would try to write the problem as ...

14 years ago | 0

| accepted

Answered
Simple file I/O problem - help needed
Hi, I created a test file (test.txt) with the following content: "title1","title2" "somestring1","5423423" "somestring...

14 years ago | 0

Answered
Concatenation of 4x8 cell arrays
Hi, try cell2mat(your_cell_variable) So a small example would be a{1,1} = rand(4,10); a{1,2} = []; a{2,1} = []; a{...

14 years ago | 0

| accepted

Answered
How to plot best fit line with polyfit?
Hi, %generate some points, here of the function y = x^2 x = 1:6; y = x.^2; %fit second order polynomial coefs = po...

14 years ago | 1

Answered
Problem opening a Simulink file
Hi, righ-click on the mdl file (in windows) -> choose open with (maybe in addition "choose standard program"). Than search ...

14 years ago | 0

| accepted

Answered
how to make a mex 'answer' nargin/nargout
I think this expected behavior and is totally okay. Each mexFunction has the same function signature: void mexFunction( int ...

14 years ago | 0

Answered
Is it possible tp parallelize Kalman Filter?
Hi, no that is not possible since the way the Kalman Filter is used shows that the itterations are not independent of each othe...

14 years ago | 0

Answered
Mex
Hi, I think the issue is raised in your switch statement when you open a file. You have a return in there, which leads to ter...

14 years ago | 0

| accepted

Load more