Réponse apportée
Ascii to number/decimal
str2double(s) or str2num(s)

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
What's missing from MATLAB Central...
Aside from a spell checker, I find it a bit weird that the profiles aren't linked together, i.e. a user's Answers profile is sep...

plus de 13 ans il y a | 0

Réponse apportée
Neumann boundary condition in a first order PDE
In this case you want to set pr = 0; qr = -1/v; %to cancel out f

plus de 13 ans il y a | 0

Réponse apportée
array: concatenate two columns of integers to one colum
A=[1 2 3;3 5 7]; B=[7 8 9;4 5 6]; % C=[A B]; w=size(C,2); D=10.^(w-1:-1:0); Out=sum(bsxfun(@times,D,[A B]),2)

plus de 13 ans il y a | 0

Réponse apportée
How to apply a formula (autofill) on a range of cells in Excel using MATLAB COM activeX?
From your active worksheet: %data: DataRange = e.Activesheet.get('Range','A1:B1'); DataRange.Value=[1 2]; %equation: ...

plus de 13 ans il y a | 0

Réponse apportée
My reversed vector is outputting on five different lines in the command window. How can I output to just one line?
The '\n' is creating a new line each time there is a digit: fprintf('%d%d%d%d%d\n', C) should work.

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
How to read the value of a cell one-by-one?
I'm not completely sure what you mean, but to access the induvidual characters in each cell you just had to index within that ce...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
reading data using textscan: how to record empty rows with muliple columns?
This is probably not too robust, and the numbers are still strings not numerics, but it picks up the empty spaces: str=filer...

plus de 13 ans il y a | 0

Réponse apportée
How to create a cell of strings from a vector?
Based on Sean De Wolski's answer: cellstr(num2str(x','%-0.0f'))

plus de 13 ans il y a | 1

Réponse apportée
I want to read a text file having strings and numeric data. Is there any better function than textscan?
This is quite scrappy but it gives you the data quite clearly in a cell array: n=5; %lines to skip A=fileread('TLETest.t...

plus de 13 ans il y a | 1

Réponse apportée
subplot with number on top of bar
You can use the annotation function to do this, there are a few ways to choose how to position the text. AX=zeros(4,1); for...

plus de 13 ans il y a | 0

Réponse apportée
I want to read a text file having strings and numeric data. Is there any better function than textscan?
What format do you want the data in? Using importdata gives you all the data as strings- you can convert the numeric data and sp...

plus de 13 ans il y a | 1

Réponse apportée
GUI axes size?
You could store the original axes size somewhere and reinstate that when required. For example, when the GUI loads you could sto...

plus de 13 ans il y a | 0

Réponse apportée
save workspace does not save some variables
I believe it is- try saying as a version 7.3 file. To do that you just add '-v7.3' when you are sending to the save function, se...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
retrieve mat-file version
type(FileName) should work fine, where FileName is a string containing the file name, e.g. FileName='myfile.mat'

plus de 13 ans il y a | 2

Réponse apportée
problem with repeating index values
This avoids using a loop, but it might be more limited than what you require. I extended the indexing array so you can a bit mo...

plus de 13 ans il y a | 0

Réponse apportée
problem with repeating index values
I'm not 100% sure what you're trying to do, but is this what you're after? a = [0 0 0 0]; Index=[1 1 2 2 2]; for n=1:numel...

plus de 13 ans il y a | 0

Réponse apportée
How can I incorporate a user input variable as part of a variable name?
You can just concatenate the strings: importdata([XY,'_left_ribs_1.txt'])

plus de 13 ans il y a | 2

| A accepté

Réponse apportée
Why pause(eps) takes much time?
It's just a limitation of the function- see the pause documentation: <http://www.mathworks.com/help/techdoc/ref/pause.html?nocoo...

plus de 13 ans il y a | 1

Réponse apportée
Remove Image Titles in GUI
You need to reset the axes: cla('reset') or better for a GUI: cla(axes_handle,'reset')

plus de 13 ans il y a | 0

| A accepté

Question


Semi-repeatable Cellfun Error
I'm quite thrown by this problem: I have a line which crops up in a few functions within a program, which uses cellfun to conver...

plus de 13 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
Enable datacursor for certain axes
The datatip won't show up if you hide the axes handle,e.g. AX(1)=subplot(2,1,1); plot(rand(10,1)) AX(2)=subplot(2,1,2); ...

plus de 13 ans il y a | 1

Réponse apportée
Why is the autocolor green of plot not the same as plotting 'g'?
I have no idea why, but you can set the colour manually: plot(x,y,'color',[0 0.5 0]) or, for that matter, use any 1x3 ve...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
How to split string with numbers?
Str='1,2,3,4;5,6,7,8;9,10,11,12'; Num=str2double(regexp(Str,'\d*','match')')

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
selecting only the numbers from a string variable
B = regexp(A,'\d*','Match'); returns one result for each number found in each string. You will then have to get the last ...

plus de 13 ans il y a | 12

| A accepté

Réponse apportée
Random numbergeneration with constraints
ulim=20; %max value llim=10; %min value rowlim=60; %max sum for each row m=5; %rows n=4; %columns RMat=ran...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Is there a way to delete a whole row in a uitable by clicking a delete row button?
If you want to delete table data with a pushbutton, then I think you'll have to also have a cell selection callback so you know ...

plus de 13 ans il y a | 0

Réponse apportée
how to use a while loop to perform an infinite series approximation
Here's a shabby way of doing it... x=pi/2; %test: sin(pi/2)=1; error=1; n=1; count=0; while error >= 1*(10^-3); %x ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
m_proj question: unexpected error
The clue's in the name- one is a 1x30 vector, the other's 1x180; you can make them the same size by setting the 3rd argument in ...

plus de 13 ans il y a | 0

Réponse apportée
Print Pushtool in gui doesn't work!
It could be the renderer. Try get(handles.figure1,'Renderer') for both types of plot and see if they're different. The r...

plus de 13 ans il y a | 0

| A accepté

Charger plus