Beantwortet
For loop execution problem in matlab
A = zeros(1,10); for ii = 1:20 if i<=length(A) A(ii) = 1; elseif i>length(A) ...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
How do you evaluate a function over a range of more than one variable? Rate-Time Decline Curve Analysis
t=0:14600; b = 1:0.1:2; [T B] = ndgrid(t,b); Now you can evaluate your function for all values of T and B. You ca...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Problem to save a variable to a .mat file
The error message is descriptive. Please try: save(filename,variables,'-v7.3') Please read the documentation if you would...

mehr als 11 Jahre vor | 1

Beantwortet
I have the ideal point (500,700) and the calculated point (499.79,700.44). I want to calculate the error but i can't. Please help me out
absolute_error = mean(abs((observed(:) - simulated(:)) ./ observed(:)) .* 100)

mehr als 11 Jahre vor | 0

Beantwortet
compute event rate and plot histogram
If your want to get Matlab serial date number and you don't care about leap seconds, then you could do: tun=int64([138855713...

mehr als 11 Jahre vor | 1

Beantwortet
How can I read NetCDF file data in Matlab?
doc netcdf All the capacities are well explained in the documentation. You could start reading that.

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
how to load my library in to matlab???
Include it in the program. Type _your_function_name_ where you want it to load.

mehr als 11 Jahre vor | 0

Beantwortet
Convert from Microsoft's DateTime Structure to readable date
No, I don't think there is. But if you don't care about leap seconds it is not too complicated: epoch = datenum(1,1,0); ...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
Sequence of adding numbers
It might better if you put all your results in one array. Perhaps like this: ii = 1:4; C = NaN*ones(size(ii)); for id...

mehr als 11 Jahre vor | 1

Beantwortet
How to eliminate "Edit Plot" arrow error in a copied figure?
When you do _allchild(figList(iOld))_, you are copying *everything*. That includes the uicontrols and menu. That is the source o...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
How do I create a pair of matrices approximating a convex hull of a set of points in 2-space?
*Assuming linear mapping*: Not the most efficient thing out there, but it serves as a proof of concept. The important thing ...

mehr als 11 Jahre vor | 0

Beantwortet
How do I extract subscript numbers from a matrix element?
[row,col] = find(V); plot(row,col,'r+');

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Using find function output locations to sum over values from another matrix.
idx = M(:,:,1) == 1; s1 = sum(sum(M(:,:,2).*idx)); s2 = sum(sum(M(:,:,3).*idx));

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
What do the (automatically assigned) colors in a Histogram stand for?
If you do _hist()_ on a 2D array, then you will get an histogram for each column of your array. The bars with the same color wi...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
read specific files in a directory
Ok, I'll get you started: %Finding all .vtk files in directory your_vtk_files = dir; your_vtk_files = {your_vtk_files(:)...

mehr als 11 Jahre vor | 1

Beantwortet
Can figure numbers be re-assigned?
To get a list of all the existing figures: get(0,'Children'); If figure two does not exist and you want to copy figure(5...

mehr als 11 Jahre vor | 2

| akzeptiert

Beantwortet
how to resize my large vector to a smaller one for plotting?
doc resample

mehr als 11 Jahre vor | 0

Beantwortet
change display name of a data
You could modify only the text, but that is bound to wreak havok on the display: plot(rand(10,5)); l_str = {'A','B','C','D...

mehr als 11 Jahre vor | 0

Beantwortet
How can I know the the size of an inline or anonymous vectorial expression?
nargin(F) Please accept an answer if it helped you.

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
100 times loop execution
for ii = 1:100 name = ['result_' num2str(ii) '.mat']; multiuser_traffic; %run script save(name); end ...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
how to set multiple fields in a struct without using a loop
A = {'A1';'A2';'A3'}; your_struct = cell2struct(repmat({[]},3,1),A); Please accept an answer if it helped you.

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Write both strings and numbers to a file?
Yes you can: s = 'I am a string'; n = pi(); fprintf(1,'%s %f',s,n); %Replace 1 with an actual fid

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Doubt regarding the fzero command.
It means that the function _estimateSurfacePressure()_ is in the path and will be evaluated for different values of _PO_ until o...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
How to find local peaks of plot? How to smooth data?
Then look in the file exchange: <http://www.mathworks.com/matlabcentral/fileexchange/11755-peak-finding-and-measurement For e...

mehr als 11 Jahre vor | 0

Beantwortet
Find duplicate entries and average associated values
array = [1 10; 2 20; 3 30; 4 40; 4 50; 4 60; 5 70; 6 80; 7 90; 7 100; 8 110]; [C,ia,idx] = unique(array(:,1),'stable'); va...

mehr als 11 Jahre vor | 6

| akzeptiert

Beantwortet
Is there a Matlab code for the probit random effects model for panel data?
That sounds like a specialized statistical tool. I'd be surprised if it is a native Matlab function. You could always try the...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Lloydsalgorithm: Color value must be a 3 element numeric vector
pathHandle(i) = plot(Px(i),Py(i),'-','color',cellColors(:,i)*.8);* Should be pathHandle(i) = plot(Px(i),Py(i),'-','co...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Variable size changes on every iteration
Pre-allocate. Before _departure(1) = 250_, place: departure_time = NaN .* ones(30,1);

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Specifying elements of a structure array that have different fields
To get a logical index into all _'human'_: humanIdx = cellfun(@(x) strcmp('human',x),{particle(:).type}) Please accept an...

mehr als 11 Jahre vor | 0

Beantwortet
Split one array into two while splitting each cell
*Building from Cedric's answer* Then your data probably looks like this: data = [{'13008KT}'}, {'08009KT'}, {'13009K...

mehr als 11 Jahre vor | 0

Mehr laden