Réponse apportée
Easy GUI - Multiple Errors
Apparently handles.output is the handle to a figure object. What object were you trying to set the string to? Try thi...

presque 14 ans il y a | 0

Réponse apportée
Time format conversion command
If you have a cell array, I would do this: A = {'36:40.0';'36:40.1';'34:40.3'}; % A cell array B = '${num2str(str2n...

presque 14 ans il y a | 0

Réponse apportée
Adjust width of error bars
O.k., here is an example: X = 0:pi/10:pi; Y = sin(X); E = std(Y)*ones(size(X)); B = errorbar(X,Y,E) ; pause...

presque 14 ans il y a | 0

Réponse apportée
Indexing matrix using logicals
% Given: a=[10 13 14 15 16;11 12 15 16 17; 3 5 8 9 12]; % Array T = 11.5; % Threshold. % The approach: L =...

presque 14 ans il y a | 0

Réponse apportée
Write function to expand array and average adjacent entries.
Please show what you have done so far for *your* homework problem.... The more effort you show, the more help you will likely...

presque 14 ans il y a | 0

Réponse apportée
Solve a system of symbolic variables
Use symbolic arrays instead: F = sym(zeros(num_nodes,1)); d = sym(zeros(num_nodes,1));

presque 14 ans il y a | 0

Réponse apportée
How do I combine legend entries for a spline and data points?
Here is an example: % First set up the data and the spline fit plot. x = -3:3; y = [-1 -1 -1 0 1 1 1]; t = -3:...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How do I make the desired Regular Expression?
This seems to work for your test case: str4 = regexprep(str,'^(\s*)(#{2})','$1'); Or, even simpler: str4 = regexpre...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
how to plot the vectors having different length
If you know the starting time and ending time for the amplitude, you can just make your own time vector of the correct length. ...

presque 14 ans il y a | 2

Réponse apportée
Having a slight problem with Newton-Raphson loop. No errors in command window..
To elaborate on Walter's answer. You are comparing floating point numbers for absolute equality - a mistake in general. Inst...

presque 14 ans il y a | 1

| A accepté

Réponse apportée
Cannot find error in my sort function
There is no way you are calling the function you post without getting errors. For one thing, you reference a variable N on the ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
access to string data in cell array-
Try this: anscell= {'LTlHSPRY','LTsalove','ohw','sdaer','siht','LTRDUDE'} aa1 = cellfun(@(x) strcmp('LT',x(1:2)),ansc...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
manipulation of a cell array-
Cell_array = {1,[],magic(2);'stirng',[],[]} cellfun('isempty',Cell_array)

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Simple explanation - how to use varargout
Try this: function varargout = varargoutexample(x) % Demonstrates how to use VARAGOUT. % Pass in a vector of va...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How can I use a data file as input to a function?
Why oh why would you put a 'clear all' as the first line of a function?? Functions have *their own* workspace, so the only vari...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Row by column multiplication
I think you can avoid FOR loops, but I see no reason to do so here: A=randi(10,10,3); B=randi(10,3,10); for ii = 10:-...

presque 14 ans il y a | 0

Réponse apportée
is it o.k if 'tic' is in one function and 'toc' is in another?
Yes, tic is global. Here is an example I made to test.... Example. 1st M-file: function [] = calltic() tic; ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Need help with subplot
x = 0:.01:pi; subplot(3,1,1) plot(x,sin(x)) subplot(3,1,2) plot(x,sin(x*3)) subplot(3,1,3) plot(x,sin(x*6)) ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Can these operations be vectorized?
T = reshape(1:100,10,10).'

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Possible to use anonymous function as script function input?
function output = exampleF(input) output = @(x) 3*input(x); Now from the command line: T = exampleF(@(x) sin(x)); ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
delete function doesnt work
Did you look at the value of d? Perhaps it is not 1... Take the semicolon off, see what prints to the command window when you t...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How to create a matrix to contain possible combinations of 2 sets of 1D parameters
If you mean all possible permutations, do this: x = 0:.5:2; I = npermutek(x,2) I = 0 0 ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How to write string delimiter in a string
A = '''' Or: S = 'This is how you write a '' in MATLAB'

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Vectorizing three nested loops
I2 = any((bsxfun(@minus,X,reshape(x,1,1,n)).^2 +... bsxfun(@minus,Y,reshape(y,1,1,n)).^2)<TOL,3) ;

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Minimum value of row
A = magic(6); % Given array. [MN,I] = min(A,[],2) % Minimum of each row, and index Also, whenever you have a questi...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Reading numbers from alphanumeric strings in a cell matrix
X = {'N010' 'G00' 'X0' 'Y0' 'Z0' 'N020' 'G01'... 'X-10' 'Y10' 'Z-1' 'N030' 'G01' 'X20' 'Y40'... 'Z-1' 'N040' '...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Accessing var content in column, not location
Bad idea to name a variable 'all' as you will mask the ALL function! A =[0 84.3000 90.0000 86.7000 2.0000 ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Make matlab differentiate until the conditions are met?
If you want to keep differentiating until only one of the functions has a nonzero limit, simply use: (limit(f,x,0)==0 || li...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How to get TRUE/FLASE to work for arrays of cells with mixed string and integer values?
NaN is not a string, but is the symbol for Not-A-Number. For example, 0/0 will produce NaN. To remove the nans, do something l...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Please suggest a method using Vectorization.
Many ways to do it. Here is one: x = x.*(-1).^(1:length(x)) and here is another: x(1:2:end) = -x(1:2:end)

presque 14 ans il y a | 0

| A accepté

Charger plus