Réponse apportée
Changing 'precision' through startup ?
When you open the dlmwrite function, you will find that the standard value for precn is always 5 (variable precn in subfunction ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
input variable stored in matrice
e.g. planets={'Earth','Moon','Mars'}; g=[9.81 1.62 3.71]; user_planet=inputdlg('Planet name: '); planet_ID=strmatc...

plus de 11 ans il y a | 0

Réponse apportée
How to Find Range of Values Between Point A and B
Not sure if I understand your question: Do you have all t and y data available and want to get only the y data between two t val...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Simultaneously Merging and Editing multiple text files
This will merge all text files (no matter what the content is) and add the file number. files=dir('part*.txt'); fileout...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
imwrite saving image file without extension even after specifying the extension.
The file extension will not be added if you already provide a file extension in the filename. As you have dots (.) in your filen...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
programming on random number
The code does indeed need infinite time, because the sum of 30 numbers around 0.36 will be around 10.8 (not 3.6). If you change ...

plus de 11 ans il y a | 0

Réponse apportée
How do I access files not added to my matlab path?
You know the path of the file, as you can use the dir function. Just add the path and you can open the file. >> path='C:\U...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
What is the syntax to access a particular member in an array?
Actually, I sometimes also don't want to assign some intermediate result to an extra variable. Tucker McClure has included a fun...

plus de 11 ans il y a | 0

Réponse apportée
detecting computer ID from matlab
I think that's what you're looking for: http://www.mathworks.com/matlabcentral/fileexchange/16450-get-computer-name-hostname

plus de 11 ans il y a | 0

Réponse apportée
How do I compare similar string?
With intersect, you will find the matching one string*: >> sstr1=strsplit(str1,' '); >> sstr2=strsplit(str2,' '); >>...

plus de 11 ans il y a | 0

Réponse apportée
Can you please help me how to write this?
From your three examples I see that the first two columns of amtab are: >> c1=fix((0:numel(sat)-1)/(size(sat,1)))'+1; >...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Script help: Import several .txt files into a single data matrix
First, you need to get the file names: files=dir('*_meants.txt'); If necessary, you order them by [~,ind]=sort({fi...

plus de 11 ans il y a | 0

Réponse apportée
stupid question / pass Variables in a GUI
Do you necessarily need to create x in the GetData_Callback? Why not just in the UseData_Callback? If you really need it this ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Dynamically rename existing structure arrays
It's not necessary to rename your variables. I suppose you want a matrix with all the structure, right? Then, the following shou...

plus de 11 ans il y a | 0

Réponse apportée
Can you please help me how to write this?
Your question is very difficult to understand as you give 0 details. So I'm just guessing you have some function which gives you...

plus de 11 ans il y a | 0

Réponse apportée
Issues exiting from a while loop when the figure is closed
My suggestion is to not use the figure handle but the axes handle instead (they get a new number each time): h=axes; wh...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
I have to detect the Startrow and endrow from a file automatically from a .txt file...
Both codes suggested simply read in the numbers in the file. Replace the 'file.txt' resp. 'test.txt' by your file name and copy ...

plus de 11 ans il y a | 0

Réponse apportée
send function to a function
Could you please tell us where the error occurs and what the error message says? Also, it looks as if the first line of the func...

plus de 11 ans il y a | 0

Réponse apportée
How can I print variables within a function?
Dear Andrew, you shouldn't name your variables this way. Better use the index as what it is: an index. for i = 1:numbe...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
I have to detect the Startrow and endrow from a file automatically from a .txt file...
Uh, what happened? Since your last edit, the file content is no more readable. Please reset it to code formatting. Anyway, y...

plus de 11 ans il y a | 0

Réponse apportée
How do I use sprintf to create a matrix of string and number arrays?
In such cases, I use >> v=[a;num2cell(b)] v = 'abea' 'b' 'c' [ 1] [2] [3] >>...

plus de 11 ans il y a | 1

Réponse apportée
using histogram in a loop with hold on and off
I see I forgot to post also the line where minv,maxv is created: minv=min(matrix2(:));maxv=max(matrix2(:)); What happen...

plus de 11 ans il y a | 0

Réponse apportée
how to plot a specific column of a matrix
That looks as if your data is not sorted. Either you don't plot the lines plot(...,'.') or you sort beforehand: [...

plus de 11 ans il y a | 0

Réponse apportée
using histogram in a loop with hold on and off
I try to understand and to explain. Let's take a matrix, maybe the peaks-matrix (49x49 by default) and reshape it: matri...

plus de 11 ans il y a | 0

Réponse apportée
newton-raphson for 12 equations
fsolve provides Trust-Region-dogleg (default), Trust-Region-reflective, and Levenberg-Marquardt. I think there's no built-in New...

plus de 11 ans il y a | 0

Réponse apportée
gettting Data from file
Do you want to get a whole line or a whole column? Column: >> fid=fopen('test.txt'); >> A=textscan(fid,'%d %d %d %f...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
newton-raphson for 12 equations
To solve this set of equations, I'd use the optimization toolbox function fsolve. Define your set of equations in a function (fo...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
gettting Data from file
I think fileread is not the best option in this case. If you want to read the entire file, either use importdata or dlmread. If ...

plus de 11 ans il y a | 0

A résolu


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

plus de 11 ans il y a

A résolu


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

plus de 11 ans il y a

Charger plus