Answered
Defining an arbitrary polynomial
Hi, have a look at the polynomial function from MATLAB: <http://www.mathworks.com/help/techdoc/ref/f16-5872.html#f16-6325>...

14 years ago | 0

Answered
What does the symbol ";" mean in the statement "p1 = [x; y]"?
Hi, this means x and y are combined vertically to a new vector. So p1 = [x;y] creates a vector p1 = (x) (y) ...

14 years ago | 1

| accepted

Answered
How to use one conditions's result in to another condition?
Hi, if a doesnt exist than you cant use it. But you can use ifempty to check if the variable a is filled with data, e.g. ...

14 years ago | 0

Answered
problem solving derivative
Hi, for ka = 0.17 and landa = 0.13 there is no extrema. You can plot the derivative to see that: syms x ka= 0.17 l...

14 years ago | 0

| accepted

Answered
Changing time intervals
Hi, check the values where the price changes. Maybe you have to adjust them a bit: cells = {'27/01/2012 15:30:00' 'TRA...

14 years ago | 0

| accepted

Answered
is It possible to overload dot notation operator?
Hi, I think you have to overload the subsasgn function <http://www.mathworks.com/help/releases/R2011b/techdoc/ref/subsasgn...

14 years ago | 2

| accepted

Answered
problem using command solve?!
Hi, when I run your code from the command window I get two solutions: ka=2; landa=4; syms x y = (ka/landa)*((x/...

14 years ago | 0

Answered
vector element extraction
Hi, try setdiff: setdiff(S,C)

14 years ago | 0

| accepted

Answered
creating word doc - setting watermark background image on main page and page numbers on the rest
Hi, one thing I do when I don't know the code for that is to let Word do a Macro and look at the generated VBA code. In that ...

14 years ago | 0

Answered
plotting two curves together in only one figure for different intervals
Hi, maybe like this: y_1 = @(x) -0.6729+4.8266*x-0.4855*x.^2+0.0312*x.^3 y_2 = @(x) -486.39+151.64*log(x) x_1 ...

14 years ago | 3

| accepted

Answered
Problem trying to load .dll library using 'loadlibrary', error is, A 'Selected' compiler was not found. You may need to run mex -setup.
Hi, in order to use loadlibrary you need to choose a compiler. In order to choose a compiler run mex -setup This star...

14 years ago | 0

| accepted

Answered
Correct syntax for textscan() function
Hi, try %s as format string out = textscan(fid,'%s') (fid is the filepointer created by fopen)

14 years ago | 0

| accepted

Answered
How to copy elements of a matrix in an array Uniquely?
Hi, have a look at the unique function: <http://www.mathworks.com/help/releases/R2011b/techdoc/ref/unique.html>

14 years ago | 0

| accepted

Answered
Simulink and compiler
Hi, sounds like you are looking for this: <http://www.mathworks.com/support/solutions/en/data/1-27DUK5/index.html>

14 years ago | 0

Answered
Passing variable insteaded of a hardcoded name to mcc
Hi, try the function signature call of mcc mcc('-m',func_name)

14 years ago | 0

| accepted

Answered
C compiler for MATLAB in 64-bit windows
Hi, LCC64bit wont work (at least its not supported). Which compilers are supported can be found here: <http://www.mathwork...

14 years ago | 0

Answered
Compiling MATLAB m-files for usage within c/c++ application
Hi, the only possibility to get standalone code is the MATLAB Coder, which generates C/C++ code from MATLAB code. But this is...

14 years ago | 1

Answered
Automated block-insertion for Simulink models via console or api ?
Hi, look at add_block: <http://www.mathworks.com/help/releases/R2011b/toolbox/simulink/slref/add_block.html>

14 years ago | 0

| accepted

Answered
linking libeng.lib problem in VC++ 2010
Hi, I would suggest following this awesome solution: <http://www.mathworks.com/support/solutions/en/data/1-FWTSV5/index.ht...

14 years ago | 0

Answered
Error when using decsg (PDE Toolbox)
Hi, is the variable gd (first input to the descsg function) empty? I am wondering about the location of the decsg.m function....

14 years ago | 0

Answered
ODE45, use ode45 iteratively
Hi, try using a different function handle [t,y]=ode45(@(x,t) diffeqn(x,t,w),tspan,[0 0]); where w is defined before ...

14 years ago | 0

| accepted

Answered
Speed up the code
Hi, do you have access to the Image Processing toolbox? If so, you can use the imregionalmin function: <http://www.mathwor...

14 years ago | 1

| accepted

Answered
How to keep all runs in one file or save it somewhere else to plot it later
Hi, are you looking for hold on and hold off? >> plot(1:10) >> hold on >> plot(rand(5)) >> hold off

14 years ago | 0

| accepted

Answered
Detecting "a and b are the same variable" in O(1) via pointers
Hi, if you need O(1) try a mex function: #include "mex.h" void mexFunction( int nlhs, mxArray *plhs[], ...

14 years ago | 2

| accepted

Answered
How do I get MCR to look for my MEX files in the current directory?
Hi, this error means that some dependency of that mex file couldnt be found. This happens for example when you compile your m...

14 years ago | 3

| accepted

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

14 years ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

14 years ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

14 years ago

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

14 years ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

14 years ago

Load more