Réponse apportée
Error in loading a very large matlab file
Hi Christina, does this .mat file contains several variables or one large matrix? In the latter case, I guess, you will have ...

plus de 13 ans il y a | 2

Réponse apportée
How to run an m-file in MATLAB from Visual Studio in C code
Hi Vlad, the command engEvalString evaluates a string in the engine. This string may simply be the name of a function or scri...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
Is there any way to selectively remove lines from a plot?
Hi, the easiest way is to store the handles you plot, e.g. hPlot = zeros(100, 1); for i=1:100 hPlot(i) = plot(so...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
How to look up corresponding 2D matrix from a table of 8 columns?
Hi, in this case probably this is easiest done by hand: columns = 0:5:35; thick = 7; % find the 2 indices where 7 ...

plus de 13 ans il y a | 0

Réponse apportée
How can I plot 3D graph provided that I have x,y,z value
Hi, if the data points x,y are irregular (i.e., not on some grid), just use plot3 to plot them. For functions like mesh and s...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
array of objects
Hi, something like this? classdef someClass properties name value end methods ...

presque 14 ans il y a | 3

| A accepté

Réponse apportée
1/X & X^-1 are they the same?
Hi Raymond, if it's scalars take Walter's advice on ./ and .^ (should be no measurable difference between those). If X is a m...

presque 14 ans il y a | 0

Réponse apportée
how to generate c code without using tool through embedded coder.
You want to generate code without code generation tools? I guess this is equivalent to writing the code by hand...?

presque 14 ans il y a | 0

| A accepté

Réponse apportée
fmincon and constrains
Hi, if you know that x(1)=a why don't you take x(1) out of the optimization problem? But if you want to keep it, just let lb(...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Matlab mex memory handling - same input different result
Hi, looking on the code I don't see a reason why consecutive calls don't give the same answer. So it looks as if the answer t...

presque 14 ans il y a | 0

Réponse apportée
Turning numbers into letters based on alphabetical order
Hi Brendan, something like this: n = 7; char('A'+(n-1)) What I forgot: you might also think about taking n1 = ...

presque 14 ans il y a | 1

| A accepté

Réponse apportée
Using NET assembly from within MATLAB
Hi, I'm not sure, but as a first simple test to rule this out, try to send a 1D array: you are sending a 2D array to a 1D (Sy...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Sort matrix A from least to greatest and have corresponding entries in matrix B move to equal positions
Hi, there are two ways: either combine them into one matrix and use sortrows, the other is to sort A and call sort with two o...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Same functionality as Excel Solver to set objective to a value
Hi Peter, to optimize a variable to be of value XTarget, you need to minimize the function abs(x - XTarget) If you do...

presque 14 ans il y a | 0

Réponse apportée
How can I sort(delete) contents in listbox?
Hi Haksun, in your pushbutton5_Callback you need to define newList, e.g. newList = get(handles.listbox1, 'string'); b...

presque 14 ans il y a | 0

Réponse apportée
Using string saved variables for calculations
Hi, generally speaking you can do the same as before: TotalZ = 0; for v=1:18 TotalZ = TotalZ + eval(['Z_' num2str(...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
repeat a matrix as digonal element in a new matrix?
Hi, I usually use blkdiag: A = rand(2,3); ACell = repmat({A}, 1, 10); BigA = blkdiag(ACell{:}); Titus

presque 14 ans il y a | 9

| A accepté

Réponse apportée
Out of memory issue in Matlab 7.6 (R2008a)
Hi, this is my guess (!): the values in B have an influence on the stiffness of the system. Does the ode45 makes very small t...

presque 14 ans il y a | 0

Réponse apportée
How to save a double number to integer to a .txt file?
Hi Susan, you don't have to convert to int. Just round and use save with "-ascii". Titus

presque 14 ans il y a | 0

Réponse apportée
Binary to Signed decimal in MATLAB
Hi, then I guess the other way round should do the trick as well: typecast(uint16(bin2dec('1000000000000000')), 'int16')...

presque 14 ans il y a | 0

Réponse apportée
Matlab compiled dll from m-file not linking in c/c++ application
Hi, just a comment regarding point 1): entering the following in R2011b to confirm: [x,y]=mcrversion x = 7 y = ...

presque 14 ans il y a | 0

Réponse apportée
fmincon function ( constrained nonlinear multi-variable optimization)
Hi Hadi, you will need to compute them again in the mycon function, i.e., function [c,ceq]=mycon(x) c1 = fourier(x); ...

presque 14 ans il y a | 0

Réponse apportée
Question of mean
Hi, 0.86 is not exactly representable in computers double precision representation: fprintf('%.20f\n', 0.86) 0.85999999...

presque 14 ans il y a | 0

Réponse apportée
Call a MEX function from Simulink
Hi Martijn, for the xPC Target you will need to have the source code of IPOPT solver available. You can write your S-function...

presque 14 ans il y a | 0

Réponse apportée
Issue with mean function
You will need to do exactly what you are describing: taking for each element the mean of the surrounding elements. What you did ...

presque 14 ans il y a | 0

Réponse apportée
least square method
Hi Tiara, "fit" may be next to everything. If it is a linear fit, just use polyfit, same of course for polynomial fit. Everyt...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Input argument "ke" is undefined.
Hi Rita, did you put in your S-function block three parameters to be passed as ke, kec and ku? Titus

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Old class definitions in MATLAB2012
Hi Philipp, what do you mean by "easily browse"? Do you mean taking a look at the properties? You might convert to a struc...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
nonlcon in fmincon not satisfying my constraints :( getting crazy.
Hi, fmincon will try to satisfy the relation c<0. To this end you need to compute c, but you give the relation. So: you need ...

presque 14 ans il y a | 1

Réponse apportée
How to make a small change to a big text file efficiently
Hi, if it is the same length, I would suggest to use memmapfile: open the file using memmapfile. Use e.g. strfind to find whe...

presque 14 ans il y a | 0

Charger plus