Respondida
Optimizing a 'for' loop
Hi, you should do the strcat out of the loop, something like PT12 = strcat(PT{1,1}(:,1), PT{1,2}(:,1)); and then you ...

alrededor de 11 años hace | 1

| aceptada

Respondida
Matlab function runtime in Simulink
Hi Tim, Simulink does not simulate in Real-Time. So if a step of 1s of simulation time takes 0.01s of computer time or an hou...

alrededor de 11 años hace | 0

| aceptada

Respondida
Multiple Matlab installations with diferent mex compiler?
Hi Jonas, multiple MATLAB installations do not share the same preferences, but 32/64 bit, that's right. One simple strategy i...

alrededor de 11 años hace | 0

Respondida
How to speed up surf plot for thousands of objects ?
Hi, parfor won't work, because the figure you plot to is bound to the MATLAB desktop you work on. You can transfer computatio...

alrededor de 11 años hace | 0

Respondida
Need to get rid of an eval and loop
Hi, to start with, I would suggest to do a data_i = eval(sprintf('data%d', i)); at the very beginning of the i-loop a...

alrededor de 11 años hace | 0

Respondida
Saving a matlab figure file without displaying it
Hi, you might open the figure invible: f = figure('visible', 'off'); surf(peaks); print -djpeg test.jpg close(f) I...

alrededor de 11 años hace | 6

| aceptada

Respondida
Run one function only once when the function starts everyday or some time period
Hi, you mean something like this: function Data() l = login(); code of data processing....etc function aLogin =...

alrededor de 11 años hace | 1

Respondida
Using DLL functions with parfeval
Hi Alexander, using loadlibrary will load the dll only to the client MATLAB, not to the pool workers. You will need to do this ...

alrededor de 11 años hace | 1

| aceptada

Respondida
export a jar file from MATLAB
Hi, MATLAB is MATLAB, .jar is Java. There is no "export of a jar file". But there is a product called MATLAB Builder JA (see ...

alrededor de 11 años hace | 0

Respondida
co-existing matlab compilers
Yes. Multiple MCR versions on one machine are no problem. The compiled application always looks for the exact match, regardless ...

alrededor de 11 años hace | 0

Respondida
Hold plot for several different cases
Hi, the simplest would be to add after the plot command: plot(handles.plot,x,y,'DisplayName',name,'Color',color); hol...

alrededor de 11 años hace | 0

Respondida
mex folder with all elements
Hi, not really. You can add all files of one folder by /my documents/*.cpp but that doesn't include sub folders. You ...

alrededor de 11 años hace | 1

Respondida
Pass parameters to simulink executable
Hi Stefano, you pass the parameters as .mat file via command line parameter to the executable. How to do this is described in...

alrededor de 11 años hace | 0

Respondida
MATLAB deploytool not working, fails while building.
Hi Ivan, did you change the version of the JDK? You don't have to use the exact same, just the same major version. So if your...

alrededor de 11 años hace | 0

Respondida
Problem with factorial recursive function
Hi Arun, your code does not work for arrays because of the "if n<=1". You would need to do something like idx = (n>1); ...

alrededor de 11 años hace | 1

Respondida
Code optimization (3 line function)
Hi, one thing that comes to my mind: can you swap rows and columns, i.e., transpose your input matrix? function Y = refl...

alrededor de 11 años hace | 1

Respondida
How can I write all month's last dates for a given period of time?
Hi, first of all: you don't need the loop BigMatrix = b + (1:a); BigMatrixStr = cellstr(datestr(BigMatrix)); For the...

alrededor de 11 años hace | 1

| aceptada

Respondida
How to convert distinct strings in a cell array to numbers.
Hi, something like this: x = {'Loc' 'Buf' 'Cac' 'Loc' 'Cac' 'Buf' 'Buf' 'D'} [C,~,ib] = unique(x); % the unique s...

alrededor de 11 años hace | 1

Resuelto


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

alrededor de 11 años hace

Respondida
Class using static method causes clear warning
Hi Hakan, instead of a static method you could use a constant property. BTW, what version of MATLAB do you use? I remember th...

alrededor de 11 años hace | 0

| aceptada

Respondida
Using mex variable_name; where variable_name contains filename to be compiled
Another way of doing this is similar to other functions, that are often used this way as save, load, etc. Use the functional for...

alrededor de 11 años hace | 0

Respondida
how to find mean from cell
Hi, first of all, why do you convert the matrix to a cell? Why not call mean for M? It should give you the mean for all colum...

alrededor de 11 años hace | 0

Respondida
C++ shared library compiling/packaging errors
Hi, I'm not sure, but I could imagine it's the name "main". In C/C++ the main function has a special meaning (and a special s...

alrededor de 11 años hace | 1

| aceptada

Respondida
Optimization Of Function, Curve Fitting
Hi Mike, if you have the Optimization Toolbox available, take a look at the function doc lsqcurvefit It is exactly fo...

alrededor de 11 años hace | 0

Respondida
I did not find in the documentation. What is the meaning of set(0,....). What does 0 signify?
Hi, the 0 is the root of the graphics system. It contains information like screen resolution: get(0) CallbackO...

alrededor de 11 años hace | 0

Respondida
How to Add a Header file(#include"*.h") from simulink ?
Hi, under the code generation pane for the Simulink Configuration there is the entry "Custom Code". Here you can add you head...

alrededor de 11 años hace | 2

| aceptada

Respondida
MCR v7.16 Problem
Hi, you will need to install the correct MCR on "the other" computer. You find the MCRInstaller in your R2011b installation u...

alrededor de 11 años hace | 0

Respondida
Matlab Coder / Compiler and Classes
Hi David, leaving the speedup aspect aside another option would be to use MATLAB Compiler and MATLAB Builder NE <http://www.m...

alrededor de 11 años hace | 0

| aceptada

Respondida
Attempt to reference field of non-structure array.
Hi, please use the code button to format your code. I assume the error happens at the line rowa=scana.data(:,end); Ta...

alrededor de 11 años hace | 0

Respondida
Cpp file in Matlab
Hi, you will need to tell mex where to find the include files, and probably also the library files. Your call should look som...

alrededor de 11 años hace | 0

| aceptada

Cargar más