Answered
Create and combine quiver and contour plots
contourf(x,y,sqrt(vx.^2 + vy.^2));

11 years ago | 0

Answered
Writing function that ether gives as a result or that uses a two-dimensional array as input?
It is very easy to use arrays in Matlab. Just open a new file "myfun.m", define a function function y = myfun(x) y = 2*y; ...

11 years ago | 0

Answered
Help regarding "Attempted to access gainx(0.0101768); index must be a positive integer or logical." error.
Matlab needs * to denote multiplikation: gainx = 1 - gainx*(1-R); Does this solves your problem?

11 years ago | 1

| accepted

Answered
Combined value of different arrays with constraints
result = nan(size(p_th)); for t=1:length(p_th) if ismember(p_th(t), A) result(t) = p_th(t) - p_c(t) - constant_a; ...

11 years ago | 0

| accepted

Answered
A Problem with log10
You overwrite Matlabs log10 function with your log10 matrix; rename it and everything should work fine.

11 years ago | 1

| accepted

Answered
Remove element from cell array completely
handles.guideGUI(15) = [];

11 years ago | 2

| accepted

Answered
How to create a 2D circular intensity plot?
Define your X Y Cartesian coordinates with meshgrid, convert to radius and angle R = sqrt(X^2 + Y^2); A = atan2(Y, X); ...

11 years ago | 1

Answered
Specify file to be called from command line (.m/.p)
No, you can't run the mfile if a pfile of the same name is in the same directory as the mfile: When you call a P-code file, ...

11 years ago | 1

| accepted

Answered
How to sort file when reading them with dir ?
Convert each filename to the corresponding number (strip leading doc_ and trailing .txt, then use double); next, sort the number...

11 years ago | 0

Answered
How to skip a parameter in a function? ex: A = fread(obj,size,'precision') without size.
Supply an empty argument; the function should use the default instead: fread(fid, [], 'uint8') (for fread you can just dr...

11 years ago | 2

Answered
Can you modify the code provided on given link.?
Just convolve your data with the filter F = [0 1 0; 1 0 1; 0 1 0]/4; You can use imfilter for the convolution.

11 years ago | 0

| accepted

Answered
Image analysis with 688x520 images works, but same program produces nonsense for 1101x832 images
Maybe there are some variables set from your first analysis. Use clear and rerun your second analysis.

11 years ago | 0

Answered
Can you help me about this problem?
Lines like r21y -r21x -r22y r22x 0 0 0 0 1; have just 9 colums: r21y -r21x -r22y r22x 0 0...

11 years ago | 0

Answered
How to store loop values into array?
You can use cell arrays to store variables of different sizes. Like V{i}(j)= y(j+1) - y(j); And something is probably wro...

11 years ago | 0

Answered
find cannot read all values in .mat file
Try lo=[ -5.2:0.1:8]'; la=[49:-0.1:42.4]'; to get _all_ values at 0.1 spacing.

11 years ago | 0

Answered
what is the difference between YCbCr and YCuCv models?
From http://en.wikipedia.org/wiki/YCbCr Y′CbCr is often confused with the YUV color space, and typically the terms YCbCr and...

11 years ago | 0

Answered
how to convert RGB image into YCuCv model by using reversible colour transform ?
See https://en.wikipedia.org/wiki/JPEG_2000#Color_components_transformation I = imread('peppers.png'); R = I(:,:,1); G = ...

11 years ago | 0

Answered
how to extract Y channel from YCuCv image?
See https://en.wikipedia.org/wiki/JPEG_2000#Color_components_transformation I = imread('peppers.png'); R = I(:,:,1); G =...

11 years ago | 1

Answered
How to set up Compiler Configuration?
When you run mex -setup you generate a personal mexopts.bat in your prefdir. Copy this to the system default lccopts.bat should ...

11 years ago | 0

| accepted

Answered
How do I use a for-loop to do fft and plot the power?
May be that's because they are the same? I get different curves using random input. BTW: note that n is always 1000 in your c...

11 years ago | 0

| accepted

Answered
How can I write a program to make someone input a 6 digit number and show a result of the summation of the 6 digits?
Convert the number to a string, and then convert each character of the string to the corresponding value (using arrayfun to work...

11 years ago | 0

Answered
Subscripted assignment dimension mismatch
The term exp(-UFR*i) is indepent of t, so you could compute it as for i = 1:length(extrapolatedmaturities) expUFR(i) = e...

11 years ago | 0

| accepted

Answered
find cannot read all values in .mat file
If you change the number of intermediate values in your linspace function you probably get some values that are not contained in...

11 years ago | 0

Answered
Strange Undefined variable or control error for a function
Have you double-checked that your control.m is seen by Matlab? What does >> which control shows before you type >> c...

11 years ago | 0

Answered
How to detect SURF features on image in matlab?
You probably have to convert the image to double I = im2double(I); or (without the Image Processing TB) I = double(...

11 years ago | 0

Answered
Import and format CSV file
You can use num= 48.68; num1= floor(num); num2= (num - num1)*1000;

11 years ago | 0

Answered
How do I import Data from a different folder?
Easy as addpath('C:\xx\xx\data_folder\composite1.dat')

11 years ago | 0

Answered
Fzero with defined scalar parameters
If FUN is parameterized, you can use anonymous functions to capture the problem-dependent parameters. Suppose you want to ...

11 years ago | 3

Answered
Distance from point to plane
Plane= [-37.7423 -74.6518 1.6262 -33.1443 -72.8633 1.6262 -33.6488 -70.8894 62.1935 -38.2...

11 years ago | 0

Load more