Respondida
is there an easy way to import data separated by brackets
Hint: str = '((0,0),(0.1,5),(0.2,7.5))'; M = textscan( str, '%f%f%f%f%f%f' ... , 'Delimiter', ','...

alrededor de 14 años hace | 0

| aceptada

Respondida
How to input a variation of datenum(now)?
Hint: datestr( floor(now) +7/24, 'yyy-mm-dd HH:HH:SS' ) returns ans = 2012-10-10 07:00:00

alrededor de 14 años hace | 1

| aceptada

Resuelto


Siblings of a graphics object
Given a valid, scalar, handle of a graphical object: find the set of all objects that have the same parent as the original that...

alrededor de 14 años hace

Respondida
removing parentheses around digits using regular expressions
>> regexprep( str, '\(([\d.]+)\)', '$1' ) ans = 2+p_5*3-0.3 str = (2)+p_5*(3)-(0.3)+exp(3) >> reg...

alrededor de 14 años hace | 0

Respondida
Trying to upload a CSV in matlab
It says: *Use TEXTSCAN* ...., which is a good advise. We cannot help without knowing something about the file.

alrededor de 14 años hace | 0

Respondida
MatLab classes using other classes
Yes, instances of other classes may be values of properties. obj.my_property = [ OtherClass, OtherClass ]; creates an...

alrededor de 14 años hace | 1

| aceptada

Respondida
replacing a string with another and vice versa
A start of one way to use regular expression: string = regexprep( string, '(?<=a)\((\d+)\)', '_$1' ); string = regex...

alrededor de 14 años hace | 1

Respondida
Slowing of program when adding legend.
legend is slow, especially if it runs into trouble finding a suitable position. Specify a position and see if that improves the ...

alrededor de 14 años hace | 0

Respondida
??? Error using ==> fprintf Invalid file identifier. Use fopen to generate a valid file identifier.
# legal file name? what string is produced by "[pwd '/' directory '/Stats_' vec_info(cd).evmarker]"? # add assert( fid >= 3, .....

alrededor de 14 años hace | 0

Respondida
How do I form a loop to perform calculations on series of variables in workspace?
Firstly, have a look at this: <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F...

alrededor de 14 años hace | 0

| aceptada

Resuelto


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

alrededor de 14 años hace

Resuelto


Back to basics 26 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of strings of all MATLAB keywords.

alrededor de 14 años hace

Resuelto


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

alrededor de 14 años hace

Respondida
How to give time interval with different parenthesis in matlab?
Try >> t = 0 : 0.0005 : 2-eps(2e3); t(end) ans = 1.9995 >> or >> t = 0 : 0.0005 : 2; t(...

alrededor de 14 años hace | 0

Respondida
Am I doing this right?
Here is the output of running a modified version of your script: input height of object:123 h = 123 x =...

alrededor de 14 años hace | 0

| aceptada

Respondida
"Error displaying value" in Workspace browser for user defined object
Isn't the message Error using disp Too many input arguments. ?? Which Matlab release? *--- Cont. ---* T...

alrededor de 14 años hace | 2

| aceptada

Respondida
Serial Object with Callback Function Ignores ASCII values > 127
# CRLF, i.e [13,10] is used more often # do you have 8 databits?

alrededor de 14 años hace | 0

Respondida
Pass variable by reference to function
No, there is no way to pass a variable by reference. See <http://blogs.mathworks.com/loren/2006/05/10/memory-management-for-func...

alrededor de 14 años hace | 2

Respondida
Error to import txt data
Inspection of the file, b_ifi_1.txt, shows # tab-delimited # plenty of "missing data" The error you report is most likel...

alrededor de 14 años hace | 0

Respondida
can mlint report undefined variables?
The problem is that w and v could be m-file functions. There is an optional test that you can apply in the File | Preferences | ...

alrededor de 14 años hace | 0

| aceptada

Respondida
how to combine several functions
Hint: %% f1 = @(k1)108.4*k1; f2 = @(k2)108.4*k2; f3 = @(k3)108.4*k3; %% sumf = @(k1,k2,k3) f1(k1...

alrededor de 14 años hace | 0

| aceptada

Respondida
Incorrect import of HH:MM data from text file
By definition, the documentations says: In MATLAB, serial date number 1 is January 1, 0000. If date is not given, Matl...

alrededor de 14 años hace | 1

Respondida
Unable to export large files from MATLAB to SQL server
*OutOfMemoryError* Did you try increase the allocation of the java heap memory? File, Preferences, Java Heap Memory

alrededor de 14 años hace | 0

| aceptada

Respondida
What's missing from MATLAB Central...
Yes, there is little *"collaboration on common problems"* at the Matlab Central. To me it appears to be a good idea. Why doesn't...

alrededor de 14 años hace | 1

Respondida
How does one input a large amount of data that has a different number of columns per row?
textscan cannot parse rows with variable number of columns. AFAIK: there is no function in Matlab that can do that. There are...

alrededor de 14 años hace | 0

| aceptada

Respondida
Unidentified function or variable in Matlab cannot figure out
Yes, I cannot see any problem. This code RT = 1e4 * rand( 1, 100 ); jj = 1; for ii = 1:length(RT) if...

alrededor de 14 años hace | 0

Respondida
Importing data files with data sets seperated by enters
See the question <http://www.mathworks.se/matlabcentral/answers/47477-parsing-formatted-text-file-quickly Parsing Formatted Text...

alrededor de 14 años hace | 0

| aceptada

Respondida
find index of a matrix through another matrix
This is possible if A and B are whole numbers %% A = [ 1, 3, 4, 6, 7 ]; B = [ 3, 4 ]; %% ix1 = ...

alrededor de 14 años hace | 0

Respondida
How do you load a .csv file, skip lines within it, and plot the values?
Try data = textscan( fid, '%s%s%f', 'Headerlines', 16 ); Delimiter is obviously one or many "space" or tab. Default ha...

alrededor de 14 años hace | 0

Respondida
there is a way that if clause it is execute
Try this: for ii = 1 : 1e7 x = rand; if x < 1E-6 disp( 'do-something' ) end e...

alrededor de 14 años hace | 1

| aceptada

Cargar más