Respondida
Great Circle Arc Distance Error with Dimensions
Getting a matrix result using ndgrid: function d = grcdistance(lon1,lat1,lon2,lat2) % D = GRCAZIM(LON1,LAT1,LON2,LAT2) ...

más de 11 años hace | 1

Respondida
Why slow conversion from date in Matlab time to day of year?
Try this variation using datevec instead of datestr: vecGmt = datevec(floor(timeGmt)); % Set hms to 0's using floor vecG...

más de 11 años hace | 3

| aceptada

Respondida
HOW TO EXIST FROM A LOOP AND COME BACK TO IT AND THE ITERATION NUMBER CHANGE
I don't fully understand what you are trying to do, but I will say that in general if you want to change the loop index value in...

más de 11 años hace | 0

Respondida
Help with using "nargin"
Think about what happens in your code if nargin == 1. In that case, b does not exist, but you get into the nargin<3 test and try...

más de 11 años hace | 2

Respondida
Significantly different time taken to index different columns of an array?
The profiler can be a bit arbitrary sometimes when assigning timing, and this might be one of those cases. I have seen cases whe...

más de 11 años hace | 2

| aceptada

Respondida
if the cell duplicated put last column in the previous row
Maybe idx is empty (i.e., the find didn't result in a match). Do this to verify: dbstop if error Then run your code. Whe...

más de 11 años hace | 2

| aceptada

Respondida
Matrix operations in three dimensions
You can build components without a loop by reshaping the vectors A, f, theta as 1x1xN and then using bsxfun with @times to get t...

más de 11 años hace | 2

| aceptada

Respondida
mex usage efficiency question
You don't say definitely whether or not you will need the PCL cloud class data in a MATLAB variable for some reason (maybe some ...

más de 11 años hace | 1

| aceptada

Respondida
How to save memory: loops or copy paste
The memory used by the code itself is insignificant, so looping vs copy-paste is not a memory concern. For maintainability and r...

más de 11 años hace | 0

| aceptada

Respondida
ode15s XX must return a column vector
The "column vector" error can be resolved by changing the return variable into a column vector. E.g., dcdt(1) = 1.2e17*dp...

más de 11 años hace | 1

| aceptada

Respondida
how to find the index value
If you are given the value 7 and want to find it in A and then get the corresponding row in B, then you could do this: x = ...

más de 11 años hace | 0

| aceptada

Respondida
Error "Not enough input arguments" for a ode-function
I haven't looked at the code in detail, but the 1st argument of the ode15s call should be a function handle. E.g., [w_adiab...

más de 11 años hace | 0

| aceptada

Pregunta


TMW Newsgroup Portal frozen?
The Newsgroup portal seems to be frozen. Nothing appearing beyond May 9, and I can't post anything through it. Are others seeing...

más de 11 años hace | 0 respuestas | 0

0

respuestas

Respondida
Setting up mex to use the Visual Studio 2013 compiler
MSVC 2013 was probably released too late for R2012b to include in their mex build files. You might look at this FEX submission: ...

más de 11 años hace | 0

Respondida
Will upgrading matlab from 2009b to 2015 improve performance of mex Funtions?
The speed of your mex routines will likely depend mostly on the compiler you are using, and not the MATLAB version you are using...

más de 11 años hace | 1

Respondida
I can't find the Compiler:Compaq visual fortran 6.5
R2010a does not officially support Compaq Visual Fortran: http://www.mathworks.com/support/compilers/R2010a/win32.html You...

más de 11 años hace | 1

Respondida
how to adjust mat's Decimal point
Not sure what the real question/problem is. If you want to display more digits on the screen, you can use the format command. E....

más de 11 años hace | 0

Respondida
Can I have array of sparse matrices?
Yes, but not directly with inbuilt MATLAB functionality. Instead, you can use this FEX submission by Matt J: http://www.mathw...

más de 11 años hace | 0

Respondida
passing a structure into a fortran subroutine in a mex file.
You will have to copy the data one field at a time. This is true for both passing in a structure and passing out a structure, pr...

más de 11 años hace | 1

Respondida
Sin(pi) or cos(pi/2) problem with Matlab
Pre-test the value of x. E.g., for scalar x: if( floor(x) == x ) f = inf; else f = x^7 + cos(x)^4 / sin(pi...

más de 11 años hace | 0

Respondida
Error in program (assignment A(I)=B)
To debug, at the command line type the following: dbstop if error Then run your code as usual. When the error occurs, yo...

más de 11 años hace | 0

Respondida
using BLAS function in a computational routine in mex
For -largeArrayDims I might expect the BLAS integer arguments to be 64-bit. You are passing 32-bit constant 1's in the 3rd argum...

más de 11 años hace | 0

| aceptada

Respondida
How can I convert MATLAB code into C code?
See MATLAB Coder http://www.mathworks.com/help/coder/index.html

más de 11 años hace | 1

Respondida
why do i get the segmentation error while running a mex file? how do i solve this?
What are the types of the variables you are passing in? E.g., here is a check at the beginning or mexFunction for the 1st argume...

más de 11 años hace | 1

| aceptada

Respondida
Is this a bug on the zero power of matrix?
There are multiple ways of evaluating the limit of x^y when x and y both go to 0. One of them, the way you used, is to start wit...

más de 11 años hace | 0

Respondida
Error using calllib, unable to load C/C++ libraries
In the calllib statement, try using 'toupcam' as the library name instead of 'toupcam.LIB'.

más de 11 años hace | 1

| aceptada

Respondida
LOOP in matlab (for)
It appears you have multiple variables in your workspace with names such as U_01, U_02, ... U_60 and you want to make more of th...

más de 11 años hace | 2

| aceptada

Respondida
mex C compiler cannot find .c file
What do you get whey you type: dir yprime.c Also, as a general rule you should *copy* source files from their original d...

más de 11 años hace | 0

Respondida
How to solve a matrix with increments
Your code turned into valid MATLAB syntax: %1.152T1 - 1.152T2 = -50974.255 sinx %1.536T1 + 1.536T2 = 50974.255 cosx ...

más de 11 años hace | 0

| aceptada

Respondida
Retrieving (all) information from a cell array when meeting a predefined condition?
Using logical indexing: a(strcmp(a(:,1),refstring),:)

más de 11 años hace | 0

| aceptada

Cargar más