Risposto
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...

quasi 12 anni fa | 0

Risposto
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; ...

quasi 12 anni fa | 0

Risposto
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. ...

quasi 12 anni fa | 0

Risposto
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...

quasi 12 anni fa | 0

| accettato

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

quasi 12 anni fa | 0

Risposto
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...

quasi 12 anni fa | 2

Risposto
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...

quasi 12 anni fa | 0

Risposto
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];

quasi 12 anni fa | 0

| accettato

Risposto
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...

quasi 12 anni fa | 0

Risposto
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 ...

quasi 12 anni fa | 0

Risposto
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...

quasi 12 anni fa | 0

Risposto
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...

quasi 12 anni fa | 0

Risposto
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...

quasi 12 anni fa | 0

| accettato

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

quasi 12 anni fa | 0

Risposto
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 ...

quasi 12 anni fa | 0

| accettato

Risposto
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...

quasi 12 anni fa | 0

Risposto
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 ...

quasi 12 anni fa | 0

| accettato

Risposto
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. ...

quasi 12 anni fa | 0

Risposto
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...

quasi 12 anni fa | 2

Risposto
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'...

quasi 12 anni fa | 0

Risposto
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])

quasi 12 anni fa | 0

| accettato

Risposto
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 +...

quasi 12 anni fa | 1

| accettato

Risposto
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...

quasi 12 anni fa | 0

Risposto
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); ...

quasi 12 anni fa | 1

| accettato

Risposto
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); ...

circa 12 anni fa | 0

Risposto
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...

circa 12 anni fa | 0

Risposto
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...

circa 12 anni fa | 0

| accettato

Risposto
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...

circa 12 anni fa | 0

Risposto
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) ))) ...

circa 12 anni fa | 0

Risposto
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...

circa 12 anni fa | 0

| accettato

Carica altro