已回答
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'); ...

9 years 前 | 4

| 已接受

已回答
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...

9 years 前 | 5

已回答
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. ...

9 years 前 | 2

| 已接受

已回答
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...

9 years 前 | 0

已回答
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 ...

9 years 前 | 0

已回答
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 = ...

9 years 前 | 0

已回答
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 ....

9 years 前 | 0

已回答
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

9 years 前 | 0

| 已接受

已回答
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...

9 years 前 | 0

已回答
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: ...

9 years 前 | 2

| 已接受

已回答
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 {...

9 years 前 | 0

| 已接受

已回答
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...

9 years 前 | 0

已回答
"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 ...

9 years 前 | 1

已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 2

已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 0

| 已接受

已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 0

| 已接受

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

9 years 前 | 0

| 已接受

已回答
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...

9 years 前 | 0

| 已接受

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

9 years 前 | 1

| 已接受

已回答
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 ...

9 years 前 | 0

已回答
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 ...

9 years 前 | 1

已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 0

| 已接受

已回答
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...

9 years 前 | 0

| 已接受

已回答
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...

9 years 前 | 1

已回答
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...

9 years 前 | 0

加载更多