Réponse apportée
stepplot systems name
For one system: sys = rss(3); h = stepplot(sys1); h.Response.Name = 'Bill'; Or multiple systems: sys1 = rss(3...

plus de 15 ans il y a | 2

| A accepté

Réponse apportée
file name manipulation
NUM2STR is useful for stuff like this. Y = {'a' 'b' 'c' 'd'} for jj = 1:4 for n = 1:9 filename = ['S_1...

plus de 15 ans il y a | 0

Réponse apportée
Diagonal direction - difference between adjacent elements
Use 2-D convolution: I = [ 5 4 3; 9 8 6; 6 3 4;] I_1 = I; I_2 = I; I_1(2:en...

plus de 15 ans il y a | 3

| A accepté

Réponse apportée
HELPPP!!! polynomial to transfer function?
Here's an idea. syms x eq1 = x^2+2*x+1 eq2 = x^2+3*x+2 s = tf('s') eq1_s = strrep(char(eq1),'x','s'); ...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Access to for loop index
There is no special variable. You have to do it yourself: i_list = [start:step:end] for n = 1:numel(i) i = i_list(n)...

plus de 15 ans il y a | 1

Réponse apportée
Uncertainty of mldivide
Any uncertainty introduced by using MLDIVIDE is *many many many* orders of magnitude smaller than errors due to having a real-wo...

plus de 15 ans il y a | 3

Réponse apportée
Rearranging matrices
If your original matrix is called "data" data_new = zeros(6,168); for n = 0:(168/6)-1 data_new(:,6*n + (1:6)) = data...

plus de 15 ans il y a | 1

Réponse apportée
TeX problem -- why?
MATLAB's TeX does not support those. However, these two will work: gtext('$\frac{1}{2}$','interpreter','latex','fontsize',...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
assign differernt marker and put an offset in x-axis in subplot()
You have 15 different patterns, and since there are only 13 possible markers, why not divide them up using (5 markers) x (3 colo...

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
need to extract rgb value of image in the format [r g b]
If you have a RGB image that is [m x n x 3], you can use the RESHAPE command to give you the columns as [r g b]: I = imread...

plus de 15 ans il y a | 0

Réponse apportée
Incorrect equilibrium values using fsolve
If you're going to do it by hand, then at least let MATLAB help you check your answers (using symbolic variables): %flow ra...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
While Loop problems
This is one way to go about doing it. (x is from left to right, and y is from top to bottom.) dirt_grid =[ 0 1 1 ...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Flag for ODE15s solver
There are probably a number of ways to do this, but here is one of them. You can see I am calling ode15s, but I am putting limit...

plus de 15 ans il y a | 0

Réponse apportée
sorting vectors
Call sort with a second output argument. x=[25,69,45,53]; y=[160,201,199,450]; [xsorted, I] = sort(x) ysorted = y(I)...

plus de 15 ans il y a | 1

Réponse apportée
Changes to QR factorization: qr()
Absolutely agree with Mike here. If Z weren't already unitary, why would those 2 Options give you the same result in general? M...

plus de 15 ans il y a | 1

Réponse apportée
Use elseif inside a case switch. What is Wrong with my code? Only the first "if" case only works none of the elseif work?? Please any advice would help.
x = 0.1; if 0 < x < 0.2 disp('hello') end This sort of "IF" test does not work in MATLAB. What happens is ...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
How to optimize the Parameters in my code
Your answer is actually close, but maybe it wasn't entirely straightforward to match it to the other example without some more e...

plus de 15 ans il y a | 0

Réponse apportée
3-D histogram in spherical coordinates
Just for fun, and because it makes for a great example of visualizing spherical data, here is a script to display a spherical...

plus de 15 ans il y a | 3

| A accepté

Réponse apportée
I would like to plot some data like an oscilloscope, going from the right to the left part of the screen.
You first create a graphics object, then update it's properties little by little, for example like this: y = randn(1,1000);...

plus de 15 ans il y a | 2

Réponse apportée
How to optimize the Parameters in my code
People often ask how to do this. Basically you need to pass your ODE solver to your optimization solver. This is an example of h...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
How to select/highlight a cell in the uitable automatically? Thank you.
For what you are trying to do, a listbox would be a more natural choice. Here 'Max = 1' is saying that you can only select on...

plus de 15 ans il y a | 1

Réponse apportée
Problem with integrals
A very good question. You need to use QUADV here instead of QUAD. quadv(@(x) exp(x.^2).*quad(@(z) exp(z.^2),-2,x),-2,2) ...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Surface Texturing
This is not as difficult as you think. You can use the following code as a starting point. Once you understand why it works, the...

plus de 15 ans il y a | 0

Réponse apportée
How to automatic detect selections in different uitables, and clear the selections in some of the uitables? Thanks
If you want to clear all the selections, you can redraw the table (h is the uitable handle): tmp = get(h,'data'); set(h,...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
selecting the closest possible date
If your matrix is M, and you have the Statistics Toolbox, then: X = 728628; grpstats(M(:,2),M(:,1),@(z)min(z(z > X))) ...

plus de 15 ans il y a | 0

Réponse apportée
covariance between 2 ts over time
The COV function does return a matrix. But this is not a problem since you can just extract out the relevant pieces. I think ...

plus de 15 ans il y a | 1

Réponse apportée
Interpolate
Here's one possible way to do it. I've handled the 5 consecutive zeros thing by using IMCLOSE, a function from the Image Process...

plus de 15 ans il y a | 0

Réponse apportée
plot() colors using colormap?
Maybe you could use patch objects to create the lines. colordef(figure,'black'); hold all startPoint_x = randn(1,...

plus de 15 ans il y a | 1

Réponse apportée
s-plane to z-plane transformation
Have you tried c2d? clear all close all %%Define G-filter in s-plane according to ISO 7196:1995E %poles p=[ -0....

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Find intersection between line and circle
You're pretty close. Except you don't want to solve 'x^2 + y^2 = 0' You want to solve 'x^2 + y^2 = R^2' --------------...

plus de 15 ans il y a | 2

| A accepté

Charger plus