Respondida
to find variables in a string
See FEX contribution: <http://www.mathworks.se/matlabcentral/fileexchange/32769-mparser mparser>

más de 14 años hace | 1

Respondida
Creating Edit Box without using GUIDE
This is a start fh = figure; ebh = uicontrol( fh, 'Style', 'edit' ) next step is doc uicontrol . ...

más de 14 años hace | 0

| aceptada

Respondida
Extract n lines from a text file
Something like this might work fid = fopen( 'cssm.txt', 'r' ); str = permute( fread( fid, '*char' ), [2,1] ); ...

más de 14 años hace | 0

Respondida
Extract the upper and the lower half of an integer
See: bitget C = bitget(A, bit) returns the value of the bit at position bit in A.

más de 14 años hace | 0

Respondida
cooling_load.m
Google for "EnergyPlus building"

más de 14 años hace | 0

Respondida
How to import a very large nucleotide sequence in Matlab workspace
4772342 bytes is a small file Matlab should not exit, but issue an "Out of memory error". If Matlab exits there is some other...

más de 14 años hace | 0

Respondida
use part of file name
sad = dir('AAA*.dat'); name_list = { sad.name }; captures the file names cac = regexp( name_list, 'AAA_(\d+)_...

más de 14 años hace | 0

Respondida
Clearing handle subclasses with timer objects
My mental model says that "@(a,b)" contains a snapshot of the scope in which it was created. That snapshot includes "this". Thus...

más de 14 años hace | 1

| aceptada

Respondida
Working with structures
??? >> s.p = [32 35; 36 37 39] Error using vertcat CAT arguments dimensions are not consistent.

más de 14 años hace | 0

Respondida
MATLAB plotting question.
"2sin(t)" should read "2*sin(t)"

más de 14 años hace | 0

| aceptada

Respondida
time delay
See: *timer* Construct timer object.

más de 14 años hace | 0

Respondida
rejection method
Firstly, it would probably be more efficient to use a .<nx2> matrix. Matlab is column oriented. Try M( :, M(:,1)==0 ...

más de 14 años hace | 0

Resuelto


Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

más de 14 años hace

Resuelto


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

más de 14 años hace

Respondida
pop up in address_book GUI demo with .mat file
See GUI 28 and 33 in the FEX contribution <http://www.mathworks.se/matlabcentral/fileexchange/24861-41-complete-gui-examples 41 ...

más de 14 años hace | 0

Respondida
Closing all figures, but not GUI
There is no simple way to do that in Matlab. In the FEX there are some contribution, which try to provide help, e.g. <http:/...

más de 14 años hace | 1

Resuelto


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x=123045; x_vec=[1 2 3 0 4 5]; I happened upon a trick to do ...

más de 14 años hace

Resuelto


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

más de 14 años hace

Resuelto


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

más de 14 años hace

Respondida
Efficient matrix comparisons that retain row/column order
This would be my first trial: mat3 = mat1; mat3( diff >= 0.2 ) = 0; This isn't magic it is logical indexing!

más de 14 años hace | 0

| aceptada

Respondida
explaining the output of datevec
datevec interprets a double as a serial date number. numdays = -1071 says that the first date is 1071 days before the latter...

más de 14 años hace | 0

Respondida
Indexing structured arrays
Have you tried new_struct = cat( Struct1(i:i+n), Struct2(k:k+n) ); Are the fields in the same order? Try this ...

más de 14 años hace | 0

| aceptada

Respondida
doubt regarding textscan
What do you mean by "no result"? What value does fid have? This little test works fine! str = '2.6300000000000000e+002 2...

más de 14 años hace | 0

| aceptada

Pregunta


Get available memory from Windows 7 64bits - and fast
*Background:* I run performance test on reading HDF5-files. The spread in the results are large and I cannot understand why. Now...

más de 14 años hace | 1 respuesta | 0

1

respuesta

Resuelto


Return the Nth Output from an Input Command
*Description* Given _F_, a cell array whose first element is a function handle and subsequent elements are arguments, return ...

más de 14 años hace

Resuelto


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

más de 14 años hace

Pregunta


Order of execution of multiple onCleanup callbacks
*Background:* I'm experimenting with the file format, HDF5. In my code I open/create multiple objects, which need to be close in...

más de 14 años hace | 1 respuesta | 2

1

respuesta

Respondida
delete NaN rows and columns but
Is this close? M( all( isnan( M ), 2 ), : ) = []; % removes all rows with all nans M( :, all( isnan( M ), 1 ) ) = []...

más de 14 años hace | 1

| aceptada

Resuelto


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

más de 14 años hace

Respondida
random pair data.
"not all y are use". My guess is that you want something like: y = 5 + randperm( 5, 5 ); for x = 1:5 fprintf(...

más de 14 años hace | 0

| aceptada

Cargar más