Réponse apportée
[DEPRECATED] What frustrates you about MATLAB?
Some frustration not about Matlab but about the answers forum here: These myriads of spam "questions" related to relationship is...

presque 11 ans il y a | 1

Réponse apportée
detecting the difference of the sequence
Why do you want to detect first 4 characters from the left and then the last 4 digits? My suggestion is: fid=fopen('test.t...

presque 11 ans il y a | 1

| A accepté

Réponse apportée
How to add vector from cell?
Yes: sum(cat(3,X{:}),3) the same for Y and Z. Comment: I have chosen to use the third dimension as this is not exist...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Editing a .c file using a .m file
Well, the pointer is at the beginning of the file and that's where the data is written. So the functions behave as they should. ...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
appending element to vector
As Guillaume has mentioned, that's not the usual way to go. Assume you want to plot the data (which requires equally sized array...

presque 11 ans il y a | 1

Réponse apportée
for loop number of elements
Depending on Ui, dataind and longm, this could work: winddivergencex(n,:)=... or winddivergencex(:,n)=...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
How to create rgb image in matlab?
Do you want to read or to create an image? Read: image=imread(filename); Create: image=zeros(300,400,3); %initi...

presque 11 ans il y a | 3

| A accepté

Réponse apportée
How can I find the max and min amongst a set of grouping variables?
Since you didn't write if every number will occur in the first column, I allow for "missing" numbers here (it doesn't make a big...

presque 11 ans il y a | 2

| A accepté

Réponse apportée
Application of For Next Statement?
Please make your code readable using the {}Code button on top of the edit window in future. You are overwriting a in every l...

presque 11 ans il y a | 0

Réponse apportée
Replace elements in a row matrix randomly
Is your specific algorithm necessary? I mean, that you first start with a random A and then add 1s until the condition is met? I...

presque 11 ans il y a | 0

Réponse apportée
Generating a series of marices
m=cell(size(a,1),1); for k=1:size(a,1) m{k}=a(k,:); end

presque 11 ans il y a | 0

| A accepté

Réponse apportée
I have an excel file containing text and numbers, xlsread not import the columns containing text. what should I do?
It does, it just returns it in another parameter. From Matlab help: [ndata, text, alldata] = xlsread('myExample.xlsx') ...

presque 11 ans il y a | 4

Réponse apportée
How to take a rectangular matrix of numbers and turn it into a matrix of the form (row, column, number)?
If m is your matrix: m=rand(3,2); [1+mod(0:numel(m)-1,size(m,1))' 1+fix((0:numel(m)-1)/size(m,1))' m(:)]

presque 11 ans il y a | 1

| A accepté

Réponse apportée
How to find four coordinates of inner rectangle?
vsum=sum(image,1); hsum=sum(image,2); top=find(vsum,1,'first'); bottom=find(vsum,1,'last'); left=find(hsum,1,'firs...

presque 11 ans il y a | 1

| A accepté

Réponse apportée
Error using save funktion
What is the full path of the folder you want to save the file in? Is it by chance F:\WS\Aufgabe\Henyey-Greenstein\IdentifyG\ ...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
How can I find the coordinates of a known vector, within a larger vector?
You can use strfind: Vector1 = [3 2 4 1 3 2 4 1 3 2 4 2 4 3 4 3 1 4 2 2 3 4 1 4 2]; Vector2 = [1 4 2 3 1 4 2 4 2 3 4 3 ...

presque 11 ans il y a | 2

| A accepté

Réponse apportée
What's the error in my code?
x > (i*T) && x < ((T*i)+(D*T)) You cannot use && in case of arrays. Use & instead. if x > (i*T) && x < ((T*i)+(D*T)) ...

presque 11 ans il y a | 0

Réponse apportée
How to plot the function below in cylindrical coordinates?
You need to convert your polar coordinates to cartesian coordinates: r=1:.1:2; %radius theta=0:pi/32:2*pi; %some angle ...

presque 11 ans il y a | 1

Réponse apportée
How to generate random numbers 0 and 1
e.g. randi(2)-1 or fix(rand*2) Best regards, Michael

presque 11 ans il y a | 1

Réponse apportée
how to make computations with a cell array?
Dear Simo, min(cellfun(@(x) x(5),results(:,1))) does the job. Best regards, Michael

presque 11 ans il y a | 1

Réponse apportée
How to get back red waitbar?
I'm working with 2014a, but if they didn't change the entire waitbar, you should be able to modify the color this way: h =...

environ 11 ans il y a | 0

Réponse apportée
date and time serial conversion
You can use datenum: datevec(datenum('04.11.2014 12:48','dd.mm.yyyy HH:MM')) ans = 2014 11 ...

environ 11 ans il y a | 0

Réponse apportée
Replacing NaN values with average values of the nearest numbers?
Hi Isaac, you can use interp1: nandata=[2;3;5;7;nan;nan;12]; xdata=(1:length(data))'; data=interp1(xdata(~isnan(n...

environ 11 ans il y a | 7

Réponse apportée
Sorting cells with headers... how to start sorting at row 2
You have mixed up a bit in your suggestion of the solution: sA=[A(1,:);sortrows(A(2:end,:),2)];

environ 11 ans il y a | 0

| A accepté

Réponse apportée
index must be a positive integer or logical.
I dont know how this equation should read, but might there be a * missing? You write C1=(wn(z+sqrt(z^2-1))+xdz)/(2*wn*(sqrt(...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
Why won't one of my plot points show
The point is there, it's just difficult to see this single pixel. If you really want to plot single points, better use different...

environ 11 ans il y a | 2

| A accepté

Réponse apportée
Problem with Imhist method
The x scale depends on the data type of the image. I guess in your case, Zoom is of uint16? Then, the limits of the data are [0 ...

plus de 11 ans il y a | 0

Réponse apportée
How to find the lines of two words repeated many times in a .txt file
You just have to extend your if-structure: if ischar(tline) if found if strcmpi(tline,'END') found=false; ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Change size of plotyy figure before saving.
You need the handles of both axes. You already use these handles as first output argument of plotyy in a variable you call ax: ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Dimension mismatch error in matlab
In the _first_ loop, you either have not yet initialized x or you have initialized it as n-x-41 array. In any case, after the fi...

plus de 11 ans il y a | 1

Charger plus