提问


Switch case with cell gives an error
I have this switch case but gives me an error because str is a cell. What can I do to correct it? The str is a cell 1x2. str...

12 years 前 | 2 个回答 | 0

2

个回答

提问


Cannot get to work a callback function in a simple uicontrol!!!!
I have created this simple function: function b=hide(a) % a is gcf hObj=uicontrol(a,'Style', 'slider',... ...

12 years 前 | 2 个回答 | 0

2

个回答

提问


Control the visibility of the parts of a piecewise function in plot with pushbutton
Hallo, I have a piecewise function such: x=0:1:10; s1=(x>=0 & x<=5); s2=(x>5 & x<=10); y(s1)=2.*x(s1)...

12 years 前 | 1 个回答 | 0

1

个回答

已回答
Divide an array in areas based on its values
I amazed by the simplicity of the codes both of you provided. Although I have some difficulty to understand them they solve my p...

12 years 前 | 0

提问


Divide an array in areas based on its values
Suppose that I want find the edges of ones and of not ones such that I can divide an in areas the array. Suppose the array i...

12 years 前 | 3 个回答 | 0

3

个回答

提问


While loop for the elements of an array
I have an array: a=[1 1 1 1 1 1 1 10 1 1 1 1 1 1 12 1 1 1 1 3]; I want to make a while loop that does the following ...

12 years 前 | 2 个回答 | 0

2

个回答

提问


Two functions in the same file causing error: "Maximum recursion limit of 500 reached"
I have the following function file. function y=myfun(x) y=2*x; if any(y<0) positive(x); y=myfun...

12 years 前 | 1 个回答 | 0

1

个回答

提问


Update a variable within a function and recalculate
I have created the following function function y=fun(x) y=2*x; if y<0 x=-x end and I would like ...

12 years 前 | 1 个回答 | 0

1

个回答

提问


Matrix output from function without showing sata of the matrix in the command Window
I have created a function that reads data from a file and creates a matrix. I would like to store the matrix to the workspace bu...

12 years 前 | 1 个回答 | 0

1

个回答

提问


Error when solving system of equations with fsolve
I have the following system to solve: syms x f = @(x) [(2*x(1).^2-2.*x(2).^3+1)/4; (-x(1).^4-4*x(2).^4+8.*x(2)+4)...

12 years 前 | 1 个回答 | 0

1

个回答

提问


Create an anonymous function after Symbolic differentiation
I want to differentiate a function f and the calculate the derivative of f at value of x. How can I do that? for example: ...

12 years 前 | 2 个回答 | 0

2

个回答

提问


Patching surfaces with diffferent colors of your choice
I want two patch two surfaces with two different colors such as: [0.9 0.9 0.8] and [1 0.9 0.6] I use the comm...

12 years 前 | 1 个回答 | 0

1

个回答

提问


Extracting variables from symbolic expression in a matrix form
I have a long equation in symbolic math toolbox which has the following form: A*u1+B*u2+C*u3 A, B and C are long relatio...

12 years 前 | 1 个回答 | 0

1

个回答

已回答
Open multiple files with fopen
Ok solved myself. The problem was that I was using textscan outside the current folder. Therefore I changed the folder to the fo...

12 years 前 | 0

已回答
Open multiple files with fopen
Ok I corrected and I included the fclose() but I still get empty cells in the structure files.values. Why is that? And also w...

12 years 前 | 0

提问


Open multiple files with fopen
I have written two codes in matlab: The first one is: files=dir('*.csv'); for i=1:length(files) fid(i)=fop...

12 years 前 | 3 个回答 | 0

3

个回答

提问


Join matrices in for loop
I am importing several files in matlab which are in csv format. Each of these files has two columns. So when I import the first ...

12 years 前 | 1 个回答 | 0

1

个回答

提问


Read csv file and remove some strings
I have a csv file which has values like the following: 0.0,-3.3,, 0.0,-4.9,, 0.1,-5.1,, 0.1,-5.8,, When I use...

12 years 前 | 1 个回答 | 0

1

个回答

提问


Quiver plotting arrow length
I want to plot a quiver plot of one arrow. x=1; y=1; u=3; v=4; quiver(x,y,v,u) I would expect that the arr...

12 years 前 | 1 个回答 | 0

1

个回答

提问


Making a 3D plot in a vectorized function
I have a vectorized function which accepts an input vector such as: y=myfun(x) where x=[x(1) x(2)] and I want t...

12 years 前 | 1 个回答 | 0

1

个回答

提问


Declare equality in Symbolic Math Toolbox
I am wondering how to declare an equality in Symbolic Math Toolbox. For example I want to declare that: z=x1+y1=x2+y2; H...

12 years 前 | 1 个回答 | 0

1

个回答

提问


Custom output of the fprintf
Is there any way to use fprint with an exponential output field (e) for example: %15.2e and not get an output such as *3...

12 years 前 | 2 个回答 | 1

2

个回答

提问


Does matlab have data type of sym?
I set *a* as symbolic. Then I check if *a* is a char and I get a false. If later I ask the class of *a* then its char. Suppose I...

12 years 前 | 1 个回答 | 0

1

个回答

已回答
Global Search optimization error
Thank you Walter for interest

12 years 前 | 0

已回答
Symbolic Mathematics with Optimization Toolbox Solvers
What? It cannot be done???

12 years 前 | 0

提问


Symbolic Mathematics with Optimization Toolbox Solvers
In this <http://www.mathworks.com/help/optim/examples/using-symbolic-mathematics-with-optimization-toolbox-solvers.html> is give...

12 years 前 | 2 个回答 | 0

2

个回答

已回答
Syntax for matlabFunction to produce vector variables and scalar variables
In the example that I showed in my initial post *matlabFunction* returns *in2* as a *matrix* whereas I need a *in2* to be a *vec...

12 years 前 | 0

提问


Syntax for matlabFunction to produce vector variables and scalar variables
When doing this: syms x y z t r = (x^2 + y^2 + z^2)*exp(-t); matlabFunction(r, 'file', 'my_function',... 'vars', {...

12 years 前 | 2 个回答 | 0

2

个回答

已回答
Compute in symbolic math toolbox the result of function f(x) for x equals another symbolic expression
Ok I found it. dif=subs(g,x,k+1)-subs(f,x,k+1);

12 years 前 | 0

| 已接受

加载更多