已回答
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

| 已接受

已回答
plot a graph with 3 variables.
Use _plot3_ command: plot3(x,y,z) Take a look at doc plot3 or help plot3

10 years 前 | 0

已回答
Help for creating a window
rectangle('Position',[x,y,w,h]) draws the rectangle from the point x,y and having a width of w and a height of h.

10 years 前 | 0

| 已接受

已回答
command inputdlg doesnnot work
It seems someone played with pcode.... Go to C:\MATLAB701\toolbox\matlab\uitools\ and delete the file inputdlg.p ...

10 years 前 | 0

已回答
GUIDE: Duplicated elements without duplicated functions
Every object within your GUI has to have its own callback function, and these have to be defined in your code. You have to code ...

10 years 前 | 0

已回答
How can I add text to a plot?
The error message you pasted refers to a *.m file called Untitled2.m. Do the following and tell us what you get: On the c...

10 years 前 | 1

已回答
k-means clustering: save the number of iterations in a matrix
[IDX,C,sumd,D] = kmeans(X,30,'display','iter'); where sum(sumd) is the sum of distances The number of iter...

10 years 前 | 0

| 已接受

已回答
how can i overcome this problem
Change the size of the swap partition: Under windows: <http://windows.microsoft.com/en-us/windows/change-virtual-memory-size...

10 years 前 | 0

加载更多