Respondida
Data extraction from .txt file
isMonday = ( weekday( datenum( vec ) ) == 2 ); % every monday However, bank holidays is a problem. As far as I know M...

más de 14 años hace | 0

Respondida
Data extraction from .txt file
Check whether this approach is fast enough. SSCANF used to be faster than DATEVEC to convert date strings with identical format ...

más de 14 años hace | 1

| aceptada

Respondida
Deleting rows with specific index
Try Matrix( [6 13 16 25 30 86], : ) = []; and learn how to use the Matlab documentation

más de 14 años hace | 3

Respondida
Understanding object deletion for user defined classes
The design goal of The Mathworks is that we, the users, should not need to bother about memory management - I believe. There ...

más de 14 años hace | 3

| aceptada

Respondida
How to get exact position of text with respect to figure row, column in Matlab
The parent of an text-object is an axes-object. The extent of the text-object is relative to the axes-object. Use pixels for all...

más de 14 años hace | 0

Respondida
Working with global variables is fast?
Read <http://blogs.mathworks.com/loren/2007/03/22/in-place-operations-on-data/ Lorens blog> on in-place functions Check the F...

más de 14 años hace | 1

Respondida
Import Data using function
Why not use the wizard and just ignore or delete textdata? Here is an alternative to textread. Doc says: "textread will be r...

más de 14 años hace | 0

Resuelto


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

más de 14 años hace

Respondida
try to manage a dynamic list of classinstances
Try %% man = manlists; man.nodelist(end+1) = node(1,2); %% man = man.AddNode(1,2); man.grN with th...

más de 14 años hace | 0

Resuelto


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

más de 14 años hace

Resuelto


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

más de 14 años hace

Resuelto


Is my wife right?
Regardless of input, output the string 'yes'.

más de 14 años hace

Resuelto


Add two numbers
Given a and b, return the sum a+b in c.

más de 14 años hace

Respondida
how to transform a time-serie data non uniform to uniform
Try this day = [1 2 4 6 7 8 10 11 14 15 16 19 20 21 22 23 24 25 26 27 28 29 30]; y = rand( 1, numel(day) ); day_uni...

más de 14 años hace | 0

| aceptada

Respondida
Cannot call function
I never use inline, because I believe that anonymous functions are a better alternative %% a = [-1 0 1 2 3]; b = 2*a...

más de 14 años hace | 1

Respondida
how to extract elements along specified dimension of array
A(ixi,ixj,ixk) where ixi,ixj,and ixk are numerical vectors (/scalar) of integers. ":" would correspond to (1:number_of_elem...

más de 14 años hace | 0

Respondida
Get information of property type of object properties (i.e. 'dependent')
With R2010b helps says: When comparing handle objects, use eq or the == operator to test whether objects are the same handle....

más de 14 años hace | 0

Respondida
assigning a vector to struct array filedname
I guess this does what you ask for. [objects.x] = deal_num( [X.x] ) function varargout = deal_num( vec ) ...

más de 14 años hace | 0

Respondida
gathering data corresponding to a string of dates
Logical indexing is the key I would say: data = 1 + (20-1).*rand(8760,1); time = datenum( StartDate ) + (0:8760-1)/24;...

más de 14 años hace | 0

| aceptada

Respondida
geting started with oop
Firstly, you need to be more careful with the names. Should it be Knot or Knoten and Slab or Stab. Secondly, the constructor ...

más de 14 años hace | 0

| aceptada

Respondida
Using Timer and Classes
The problem is that it is a value class and that you don't keep the updated object. classdef Updates < handle makes it ...

más de 14 años hace | 0

Respondida
Column/multi selection mode
*No*, but I agree it would be useful! Every other day I copy blocks of code to Notepad++ to use "vertical selection" and reg...

más de 14 años hace | 11

Respondida
Automatic tool to generate Sequence and Class Diagrams (UML)
2010-03-07: I replaced the diagram. (S) stands for Singleton. ================ I incude a Class Diagram that I just genera...

más de 14 años hace | 0

Respondida
Delete multiple rows from array
Two possible approaches are: array( v3==0, : ) = []; and for ii = size( array, 1 ) : -1 : 1 if v3{ii}==0 ...

más de 14 años hace | 2

| aceptada

Respondida
Find function (dependence)
Search for "Basic fitting" in the on-line help!

más de 14 años hace | 0

Respondida
Automatic tool to generate Sequence and Class Diagrams (UML)
I've done some experiments with PlantUML+Graphviz. My Matlab tool automatically generates PlantUML-code based on the m-files. Th...

más de 14 años hace | 0

Pregunta


Is it possible to control code folding with code?
There is a public <http://blogs.mathworks.com/desktop/2011/05/09/r2011a-matlab-editor-api/ MATLAB Editor API>. However, I cannot...

casi 15 años hace | 1 respuesta | 2

1

respuesta

Resuelto


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

casi 15 años hace

Resuelto


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

casi 15 años hace

Resuelto


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

casi 15 años hace

Cargar más