Beantwortet
how to compute separate line 2 dimensional points
Once you have the plot, go to _tools_ -> _Basic fitting_ select the data (1 or -1 in your case), linear and click in the bott...

fast 10 Jahre vor | 0

Beantwortet
How to rename variables in a loop?
you are not using _eval_ in the right way. You should do: x=3; eval('a = x') a = 3 Adapt the code t...

fast 10 Jahre vor | 0

Beantwortet
How do i convert the following into exe?
Matlab compiler does not support symbolic toolbox You can read this thread too: <http://www.mathworks.com/matlabcentral/an...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
EXTRACT NUMBER FROM A COMBINED STRING AND NUMBERS
use _str2double_ to get it in double format: output = str2double(String(regexp(String , '[0-9]'))) output = ...

fast 10 Jahre vor | 0

Beantwortet
how to load my file in to matlab?
Just write the name of the *.m file containing the data/script you want to load. Write it where you want it to run.

fast 10 Jahre vor | 0

Beantwortet
How to store data while simulating a model?
You need to add two blocks to your model. 1) to save data, ad "To Workspace" block. This will send and save data into the wor...

fast 10 Jahre vor | 0

Beantwortet
how to show my output data in map.
You will have to present your data by year: XX YY]= meshgrid(X1,Y1); z=ltm(:,:,1); surf(XX,YY,z') xlabel('XX') ...

fast 10 Jahre vor | 0

Beantwortet
how to select certain elements from a matrix?
B=[90,0,40,0; 0,0,10,60; 55,15,0,10; 0,15,5,0]; [col row]=find(B==0); A= [row col] % coordinate...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
trouble with complicated loop
% You are playing with two differet indeces: _i_ and _M_. % You have to fix _i_ and then perform the summation: x=ra...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
how to show my output data in map.
you could take a look at the demos within Matlab documentation. You will find many working examples on data representation, like...

fast 10 Jahre vor | 0

Beantwortet
how to make sum of (for loop)
the _for loop_: a = 3; % or whatever value you have in mind b = 2; % or whatever value you have in mind n = 10; % or ...

fast 10 Jahre vor | 0

Beantwortet
Extract data from excel using heading
[data headings] = xlsread('your_excel.xls'); headings = headings(1,:);% first row of headings, in case you have some others...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
Compare two columns in a matrix, perform if statement.
Your sample data is not very useful, but I think you are trying to do something like this: %sample data A=[-0.758061618...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
Need help to form equations
a = rand(1,4); % your a matrix syms v1 v2 v3 v4 S = solve( a(1)*v1^2-a(2)*v2-a(3)*v3^2-a(4)*v4==0,... a(3)*v3^2-a(4)...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
How to combine 2 for loops
You were not very clear in your explanation, but I think you want this: id = [ 1 3; 2 6; 3 2; 4 5; 5 1; 6 4; 7 7]; c...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
button in a figure
try this: S.f = figure; S.h=plot(rand(10,1)); % creates a figure and plot something on it % create a pushbtton ( adapt i...

fast 10 Jahre vor | 1

Beantwortet
how to correctly prompt user to enter only 1 real number,numeric value,that is within range...?
A=input('please enter only 1 number and make sure its in range: ','s'); while (isnan(str2double(A)) || str2double(A)<=4 ||...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
Reduce the size of a vector
vect_45 = rand(1,45000); % your 1x45000 array vect_36 = vect_45(:,1:36000); vect_27 = rand(1,27000); % your 1x27000...

fast 10 Jahre vor | 0

Beantwortet
Waterfall plot of a time series data
You can use _ncread_ to access your data within the netcdf file. ( From MATLAB documentation ) ncdisp('example.nc','peaks'...

fast 10 Jahre vor | 0

Beantwortet
how to convert the solid line into dashed line in the images during overlay of images
h = plot(rand(10,1)); % this creates a handle to the figure set(h,'LineStyle','--') % this convert the solid line into ...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
Tic toc command giving erroneous result
The time taken to run both scripts are insignificantly different. There are only two lines of code of difference between them: ...

fast 10 Jahre vor | 0

Beantwortet
Curve fitting for power equation
Use the curve fitting tool cftool % this will open the curve fitting tool interface From the user interface, select you ...

fast 10 Jahre vor | 0

Beantwortet
when two individual number remain in one cell such as a cell contain [300;350]. then how can i extact a single value from the cell?
To extract elements form a cell: p{1}(1) % this will return first element of first cell p{3}(2) % this will return secon...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
how to create world file
If you mean _Word_ instead of _World_: Publish the file in Microsoft Word format. publish('Your_file.m','doc');

fast 10 Jahre vor | 0

Beantwortet
How to print the first 100 primes including 1 as a vector
p = [1 primes(100)] p = Columns 1 through 19 1 2 3 5 7 11 13 17 19 23 ...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
How do I measure mean of every 10 data of a vector size 1x1500?
A = rand(1,1500); % your data M = zeros(1,150); % MEAN MATRIX for k=1:150 M(k) = mean(A(((k-1)*10+k):10*k)); e...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
How to intersect these lines?
I give you the code for two lines, you extend it to three (do it by pairs if true % code end): %For...

fast 10 Jahre vor | 0

Beantwortet
How can we Plot a line passing through two points?
If you want a line connecting A and B: A = [2 3]; B = [4 5]; plot(A,B,'*') axis([0 10 0 10]) hold on line(...

fast 10 Jahre vor | 3

| akzeptiert

Beantwortet
why can't i plot this function? :(
Try it this way: x = -5:.1:5; y = -5:.1:5; [x1 x2] = meshgrid(x,y); G2 = -(1+cos(12.*sqrt(x1.^2+x2.^2)))./(0.5.*...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
is it posible to create matrixplot for several data types?
I think -plotmatrix-does not have the option of holding the plot to add extra data. You can use _plot_ and _hold on_ instead: ...

fast 10 Jahre vor | 0

Mehr laden