已回答
How to open variables in command line?
You can sue _who_: To present all the variables: who To present variables whose name start by H: who H* To pr...

10 years 前 | 0

已回答
Complex question: How to find a formula's unique values when plotted with other formulae?
You can see it graphically with this code: x=-10:.1:10; y=-10:.1:10; [xx yy] = meshgrid(x,y); z1 = xx + 2.*yy; ...

10 years 前 | 0

已回答
3d contour plot in MATLAB
To read your data: [my_data headers] = xlsread('test data.xlsx'); But you present 4D data: 3 coordinate and value. ...

10 years 前 | 0

已回答
Is it possible to increase solving time ?
The time taken by your code depends on the way you coded the algorithm. Using built-in function might improve the performance. I...

10 years 前 | 0

| 已接受

已回答
how will i arrange the matrix?
Sort you matrix using the built-in function _sort_: doc sort

10 years 前 | 0

已回答
need advice on using RESHAPE AND IMRESIZE
Once you perform any modification in an image, the original data is lost. You can not go back and get the same image from the mo...

10 years 前 | 2

已回答
how do you write function divisible(n)?
Re-using the code above, you can do it in a single line: function [Res] = divisible(n) Res = (rem(n,3)==0 && rem(n,5...

10 years 前 | 0

已回答
how to replace the pixel value
Just assign the value: For pixel (i,j), given a RGB image (n x m x 3 matrix): p(i,j,:) = [0.2 0.4 0.5];

10 years 前 | 0

| 已接受

已回答
Related to matrix partitioning?
Try this: M=rand(1,32); n=length(M); A=zeros(4,n/4); for k=1:4%k=k+1 A(k,:) = M((1+(k-1)*n/4):n*k/4); en...

10 years 前 | 0

已回答
can any one you kindly tel me how to implement the following equations in matlab .?????????,,where n1=3,n2=3
Besides the second summation starts and ends at n1/2, your code should be like this (although you should make sure your data is ...

10 years 前 | 0

已回答
what does it mean to insert param and file_name?
it seems that your "diffusion_model" is a function that needs some input arguments. In order to run it, you have to specify the...

10 years 前 | 0

已回答
Create matrix from two arrays using colon
A = [100 , 200 , 300 , 400 , 500]; B = [105 , 205 , 305 , 405 , 505]; C = zeros(numel(A),numel(B)+1); for k...

10 years 前 | 0

已回答
how to show a result from scope to basic graph and show the parameters?
Add a "to Workspace" block to send the data to the workspace. Once your data is in the workspace, you can manipulate it as you p...

10 years 前 | 0

| 已接受

已回答
Resample of time series
Read data from the first worksheet into a numeric array: A = xlsread('myExample.xlsx'); time = A(:,1); % in case you...

10 years 前 | 0

已回答
Problem with uipanel GUi matlab
That "panel" string is associated with the bottom left panel called "Change of values". Delete it and rebuilt it again. Besides ...

10 years 前 | 0

| 已接受

已回答
Problem with uipanel GUi matlab
In the GUIDE, expand the area of your GUI downwards and eastwards. Move the "Change of values" panel too. Click on the place whe...

10 years 前 | 0

已回答
How do you create a script that calls variables from 2 other scripts (written as functions)?
you can create global variables, or better, a global struct to hold our variables. add global struct_for_variables ...

10 years 前 | 0

| 已接受

已回答
3D matrix - 2 D plot, how to make a plot ?
Plot the data after the finishing the loop. plot(t,x,t,y,t,z) Just add your x,y,z data. Your code is a bit confusing. ...

10 years 前 | 0

已回答
drawnow() causing very slow display of images
I solved a similar issue by adding a very short pause, this will clean up the buffer and speed up the pseudo-video. Add: p...

10 years 前 | 2

已回答
How can i remove empty cells and print only the nonempty cell in a cell array?
%%% your cell q1 = cell(3,1); q2 = cell(2,1); q1{1}='+ab'; q1{2} ={}; q1{3}='+BD'; q2{1}={}; q2{2} ='+aC'...

10 years 前 | 0

已回答
how can i scale the axis in such a way that y axis in between 10 and 10^10 and x axis in between 10 and 10^6?please help
Use _axis_ command axis([xmin xmax ymin ymax]) % for your case axis([10 10^6 10 10^10])

10 years 前 | 0

| 已接受

已回答
Use MATLAB's for loop to determine the value of y when n=192. (round answer to nearest integer)
A: y = 0; for k=1:n y = y + x(k)^(1/3); end B: y = 0; n = 1; while y < 165238 y = y +...

10 years 前 | 1

| 已接受

已回答
How can we determine the frequency of a pulse signal using fft?
Go to doc fft You will find a very good example on how to get the fast fourier transformation of your signal. You just...

10 years 前 | 0

已回答
How can I compute the sum and average of odd numbers by using the loop method ?
A=[23 44 2 -4 -19 15 1 -70 78]; sum = 0; N_odds = 0; for k=1:numel(A) if mod(A(k),2) sum=sum+A(k); ...

10 years 前 | 1

| 已接受

已回答
Create an array from another and find the indices.
most_common_string = {'V','SV','S','V','S'}; wanted_string='V'; idx = getnameidx(most_common_string,wanted_string); ...

10 years 前 | 0

已回答
sliding mode control question
Being Sliding mode control a non-linear control technique, you'd better start by studying as much classic control as possible (P...

10 years 前 | 0

已回答
how to run a recursive solution
1.- % make sure you have defined a value for ( Ta,P,h,Tgbv,Tgtc,Tw,Tgbv1,Tgtc1 ). In your code above Ta is missing load 'g...

10 years 前 | 0

| 已接受

已回答
use of conditional statement
if (x<0.4) ...do anything elseif (x>=0.4 | x<=0.7) ...do another thing else % this is for x>0.7 ...w...

10 years 前 | 0

已回答
How to code this? Resampling of vector
s_new(1) = sum(s(find(s<4))) s_new(2) = sum(s(find( (s<8)&(s>=4) ))) s_new(3) =sum(s(find( (s<12)&(s>=8) ))) ...

10 years 前 | 0

已回答
how to filter using matlab with multiple conditions.??
[data headings] = xlsread('your_file.xls'); ch1=data(:,1); filt_data1 = find((ch1<=3) & (ch1>=1)); data = data(filt_d...

10 years 前 | 0

| 已接受

加载更多