Risposto
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'); ...

oltre 10 anni fa | 4

| accettato

Risposto
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...

oltre 10 anni fa | 5

Risposto
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. ...

oltre 10 anni fa | 2

| accettato

Risposto
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...

oltre 10 anni fa | 0

Risposto
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 ...

oltre 10 anni fa | 0

Risposto
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 = ...

oltre 10 anni fa | 0

Risposto
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 ....

oltre 10 anni fa | 0

Risposto
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

oltre 10 anni fa | 0

| accettato

Risposto
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...

oltre 10 anni fa | 0

Risposto
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: ...

oltre 10 anni fa | 2

| accettato

Risposto
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 {...

oltre 10 anni fa | 0

| accettato

Risposto
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...

oltre 10 anni fa | 0

Risposto
"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 ...

oltre 10 anni fa | 1

Risposto
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...

oltre 10 anni fa | 0

Risposto
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...

oltre 10 anni fa | 2

Risposto
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...

oltre 10 anni fa | 0

Risposto
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...

oltre 10 anni fa | 0

| accettato

Risposto
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...

oltre 10 anni fa | 0

Risposto
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...

oltre 10 anni fa | 0

Risposto
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...

oltre 10 anni fa | 0

| accettato

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

oltre 10 anni fa | 0

| accettato

Risposto
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...

oltre 10 anni fa | 0

| accettato

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

oltre 10 anni fa | 1

| accettato

Risposto
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 ...

oltre 10 anni fa | 0

Risposto
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 ...

oltre 10 anni fa | 1

Risposto
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...

oltre 10 anni fa | 0

Risposto
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...

oltre 10 anni fa | 0

| accettato

Risposto
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...

oltre 10 anni fa | 0

| accettato

Risposto
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...

oltre 10 anni fa | 1

Risposto
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...

oltre 10 anni fa | 0

Carica altro