Réponse apportée
Nested function causes MATLAB crash (2011a)
Hi, the problem is a recursion with calling ode45: You call [t1,y1] = ode45(@launch,[0,taub_srb],[V0,M0,h0,gam0,theta...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
saveas function saves more than one file type
Hi Sarah, that's strange, I've never seen this, and I can't reproduce it. Just to be sure: does your MATLAB installation may ...

presque 11 ans il y a | 0

Réponse apportée
Cumulative minimum meaning or formula
Hi, take a look at the <http://www.mathworks.com/help/matlab/ref/cummin.html doc>. The example should be pretty clear. Basica...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Problem executing if and elseif statements
Hi, in MATLAB you cannot use chains of inequality: you need to replace 22.22>X(1,i)>11.11 by 22.22>X(1,i) && X(1...

presque 11 ans il y a | 0

Réponse apportée
Why are the simulation results different when using "Data Store" blocks instead of directly connected blocks and which result is the correct one?
Hi Michael, Data Stores break up the sorting order. If you have e.g. -> GainA -> GainB -> you know, that GainA execut...

presque 11 ans il y a | 1

| A accepté

Réponse apportée
Problem using xlsread on .csv files
Hi, adding to Guillaume's comment: could it be that your Windows versions are once english and once something else (German, F...

presque 11 ans il y a | 2

| A accepté

Réponse apportée
how to form rectangular matrix of x, y, z in (:,:,3) format from circular data
Hi, if I understand correctly you have a set of points which are given on 3D spheres and want to have them on a regular (cart...

presque 11 ans il y a | 0

Réponse apportée
How to solve 2n+2 nonlinear equations in MATLAB?
Hi Simon, you might try to use fminsearch. For simplicity I assume A and x to count from 1 instead of 0. First write the obje...

presque 11 ans il y a | 1

Réponse apportée
remove [NaN] from cell array
Hi, if your raw contains both strings and NaN, you will need to do something like this: raw(cellfun(@(x) isnumeric(x) &&...

presque 11 ans il y a | 1

| A accepté

Réponse apportée
for loops nested inside parfor loops.
Hi, if you add the following line before the inner loop, it should work: Q = zeros(10, 1); Titus

presque 11 ans il y a | 1

| A accepté

Réponse apportée
Use of Simulink-generated MEX function within MATLAB
Hi Ioannis, if you have Simulink Coder available, you can convert your Simulink model to C Code (and create either an executa...

presque 11 ans il y a | 0

Réponse apportée
Find n minimum values in an array?
Hi, if you don't want to sort, and n is not too large, you could remove the index, something like x = rand(1000, 1); n ...

presque 11 ans il y a | 2

| A accepté

Réponse apportée
Find n minimum values in an array?
Hi, if it's not floating point but integers (so no problem with roundoff),you could do the following: x = [1 3 2 4 1 3 5...

presque 11 ans il y a | 3

A résolu


Rotate counterclockwise a matrix 90 deg with left-bottom element
Example: Input [ 1 2 3 4 5 6 ] Output [ 3 6 2 5 1 4 ]

presque 11 ans il y a

Réponse apportée
using the find function to find intersection of two lines
Hi, you are looking for sign changes of A-18: find((A(2:end)-18).*(A(1:end-1)-18) < 0) Hope this helps, Titus

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Figure print - resolution stays at 96 dpi, despite specifying a higher resolution
Hi Susana, just a question: do you see any effect? I just tried it (again), and using '-r150' and '-r300' indeed doubled the ...

presque 11 ans il y a | 1

Réponse apportée
Column and Row factors
Hi, something like this? A = rand(12); err = 1; it = 1; while err > 0.05 && it<10 colFactor = sum(A,2) ./ sum(A,...

presque 11 ans il y a | 1

| A accepté

Réponse apportée
vector of n figures, where n is given by user
Something like this? n = input('How many figures?'); h = gobjects(1, n); for iFigure=1:n h(iFigure) = figure; end ...

presque 11 ans il y a | 0

Réponse apportée
clean up standard output when running in background
Hi Francesco, have you tried to use the diary function instead of redirection of output? doc diary I'm not sure, but ...

presque 11 ans il y a | 0

Réponse apportée
My optimization toolbox doesn't contain GA, pattern search and so on
Hi Varoon, ga, pattern search "and so on" are part of <http://www.mathworks.com/products/global-optimization/ Global Optimiza...

presque 11 ans il y a | 0

Réponse apportée
Convertion from U16 in U8 results overflow. Why?
Hi, hmm, I guess the first error is explainable: you indeed have an overflow here. hex2dec('0FFF')-hex2dec('0E00') ans...

presque 11 ans il y a | 1

Réponse apportée
how to define a function inside a function?
Hi, if gg is a function you will need to create it and pass to jj1. You can e.g. create an anonymous function: gg = @(q,...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Can't remove xlabel from top graph
Hi, I guess mixing some of the techniques should work. Try xlabel(handles.axes1, ''); Titus

presque 11 ans il y a | 0

Réponse apportée
how to subplot in loop using axes(handles.axes1)
Hi, if you have "handles.axes1" I assume you created your UI with GUIDE? Then the easiest is to create not one axes in GUIDE ...

presque 11 ans il y a | 0

Réponse apportée
Nested For loops- Pleeease HELP!!
Hi Pramit, if I take a look at out_M, then in the first entry you have zero. That's where you enter the "if" condition. All o...

presque 11 ans il y a | 0

Réponse apportée
Which is the shortest way to count elements in the set of vector components?
Hi, slightly less ugly: sum(v==2) Titus

presque 11 ans il y a | 2

| A accepté

Réponse apportée
How to Debug Matlab & Excel at the same time ?
Hi Alexendre, really debugging the compiled code will not work. An easy way to find out "who to blame" is to add a "save" com...

presque 11 ans il y a | 0

Réponse apportée
Concurrent runs of compiled standalone executable fail with "Could not access the MCR component cache"
Hi Costas, usually simultaneous calls of compiled applications should not interfer with each other. Otherwise it would not wo...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Why does MATLAB read a picture and add noise on it?
Hi, your image is an indexed image, not RGB. Therefore you need to read the colormap as well: [a,b] = imread('pic.gif');...

presque 11 ans il y a | 3

| A accepté

Réponse apportée
Can objective function of a linear programming model contain a constant term?
Hi Sanjib, yes and no. Of course it can contain a constant, but this constant does not change the optimization problem or the...

presque 11 ans il y a | 2

Charger plus