Respondida
Loading .mat files with same variable name
Hi, the main idea is to use load with a return argument instead of as a command, something like files = dir('*.mat'); ...

más de 10 años hace | 4

| aceptada

Respondida
Loop over fieldnames in a matlab structure
Hi David, generally speaking you seem to know how to loop on fieldnames ... I'm not sure now where your problem is? You can c...

más de 10 años hace | 5

Respondida
Conditionally replace matrix elements from other corresponding matrix
Hi Matt, two changes: you need to use "&" instead of "&&" to work for vectors, and you need to index into Y the same way. ...

más de 10 años hace | 2

| aceptada

Respondida
Unrealistic results from integration
Hi, I'm not getting the values that are supposed to be the correct values, but here is a slightly cleaner version of your cod...

más de 10 años hace | 0

Respondida
How can I use all MATLAB functions in C# ?
Yes and no: * You can use the <www.mathworks.com/help/matlab/calling-matlab-engine-from-c-c-and-fortran-programs.html MATLAB ...

más de 10 años hace | 0

Respondida
How can I write a function for the below cell array comparison?
Hi Supreet, I think this is one of the cases where a simple loop is easier than trying to do something very clever: X = ...

más de 10 años hace | 0

Respondida
Calculus with MATLAB, area under the curve
Hi, the "area under a curve" is also known as integrating the function. This should give you a starting point for searching ....

más de 10 años hace | 0

Respondida
Combining multiple .m files and a .fig file into one?
Hi, on more recent versions there is the tab "APPS" where you can package your code via the button "Package App". Titus

más de 10 años hace | 0

| aceptada

Respondida
Hi in have created .exe file from .m file using MCC but still not able to run the exe file without matlab .
Hi, did you run the MCR Installer on the machine not having MATLAB? Take a look here how it works: <http://www.mathworks.com...

más de 10 años hace | 0

Respondida
I have 3*3*20 matrix and 1*1*20 matrix. how to multiply. I have multiply q and za
Hi Ranjan, if you want to multiply each 3x3 Matrix q(:,:,idx) with the corresponding za(1,1,idx), then this should work: ...

más de 10 años hace | 2

| aceptada

Respondida
How can the output of a order character string stored in a variable?
Hi xosro, I'm not sure if this is what you want, but names = {A(1:2).name} collects the names into a cell array (or {...

más de 10 años hace | 0

| aceptada

Respondida
Trying to compile C++ Code to call it from Matlab. Issue with dependencies. Please help! :)
Hi, looking at the code and the line #include <execinfo.h> with < > instead of " " indicates that this is a system h...

más de 10 años hace | 0

Respondida
"week.m" file disapeared
Hi, EDIT: my answer below is not correct, but the comment explains what's going on. Hmm, are you sure this is a MathWorks ...

más de 10 años hace | 1

Respondida
Why I'm getting this error?
Hi, as the error indicates: have you installed on the machine where you want to run the jar file the MCR (MATLAB Compiler Run...

más de 10 años hace | 0

Respondida
Permute works extremely slow with large arrays
Hi Arseny, this is indeed a rather large array, it needs about 10.4 GB of memory. For the permutation, another 10.4 GB are us...

más de 10 años hace | 2

Respondida
Assigning file name as variable name
Hi, you should use name as a variablename to importdata: name = input('Enter the name of a file: ','s'); s=importdata(n...

más de 10 años hace | 0

Respondida
Rounding Vector Entries with zeros after the decimal place to integers
Hi, use Azzi's answer if displaying of results is what you after. If you want to eliminate some numerical noise from values t...

más de 10 años hace | 0

| aceptada

Respondida
Colour data from a vlaue
Hi Toby, yes, colormap is usually used in connection with graphics. But there is nothing wrong in using the values for your p...

más de 10 años hace | 0

Respondida
error in compiled version of GUI
Hi Amanda, it might happen that your code crashes within the subfunction Add_Index_To_DataCentral. In this case, the output v...

más de 10 años hace | 0

Respondida
Wrong result when using BLAS dot product routine (DDOT) from a MEX file
Hi, you need to change the variable definition of m and one and use two variables for "one": ptrdiff_t m, one1 = 1, one2...

más de 10 años hace | 0

| aceptada

Respondida
Single Figure is Required
Hi, replace the line fig=figure('Visible','on'); by subplot(5, 1, m); Titus

más de 10 años hace | 0

| aceptada

Respondida
Detect in simulink if the current and past 4 values are same or not
You can use 4 delay blocks, and feed x_t and x_{t-1} into one relational block, x_{t-1} and x_{t-2} into the next relational blo...

más de 10 años hace | 0

| aceptada

Respondida
25^23 without approximation
Use vpa from symbolic toolbox: digits(50); x = vpa(25); x23 = x^23 Titus

más de 10 años hace | 1

| aceptada

Respondida
executable standalone with mex file
Hi Enrico, you need to make sure that the mex file can load the synview.dll (files), which I guess are somewhere "near" your ...

más de 10 años hace | 0

Respondida
Access the array index using find
Hi, I guess you are looking for this: A1 = [1 12 23 45]; A1_1 = [45 23]; [~,idx] = ismember(A1_1, A1) idx = 4 ...

más de 10 años hace | 1

Respondida
Should parallelization be switched on manually
Hi, on first sight it looks as if the loop on D for i=1:size(D,1) k0(i,:)=D(i,:); opti...

más de 10 años hace | 0

Respondida
pixel data from mex to matlab: mxArray definition..
Hi Enrico, as a .bmp it probably has 24 bits, i.e., you iBytesPerPixel is 3. Therefore you should allocate a 1600x1200x3 matr...

más de 10 años hace | 0

| aceptada

Respondida
command similar to setdiff for case insensitive
Hi, if two commands is fine as well, you can do the following: % find index of elements in a that are in b: [flag,idx...

más de 10 años hace | 0

| aceptada

Respondida
Hidden call of m-file
An alternative is to go to the simulink preferences and enable "Callback tracing". Then you will see a printout in the command w...

más de 10 años hace | 1

Respondida
How to append multiple .mat files that have the same variable names in them?
Hi Alex, yes, that's possible. * Use dir to read all the files * Use the functional form of load, i.e. data = load(f...

más de 10 años hace | 0

Cargar más