Answered
Getting better high resolution images!
<http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig>

11 years ago | 6

| accepted

Answered
How to plot a line where the variable changes condition.
c = [-.05 .18 0;... -.0439 .1582 .3076]; b = [0,1.8,5]; f = mkpp(b,c); xx = 0:.1:5; plot(xx,ppval(f,xx...

11 years ago | 0

Answered
Take each looped value and put it into an equation
no need to use the solve command for i = 300:20:100 k = exp(18.84-21788/i); xpos(i) = sqrt(k^2+k)/(k+...

11 years ago | 0

Answered
Inserting and equation and plotting it
use the dot notation to specify element-by-element multiplication/division/exponentiation as in: d= q./(2*m)-acos(sqrt(1-(...

11 years ago | 0

Answered
Richardson extrapolation for Simpson's rule -code matlab
Simpson's rule is a Richardson extrapolation of the trapezoidal rule, the following should get you started: clc;clear ...

11 years ago | 0

Answered
How to create binary image file from text file with coordinates of points?
I don't know if this will help, but I thought I would try it. Basically it takes a 3 dimensional logical matrix (n x 24) and co...

11 years ago | 0

Answered
To create numbered variables from a for loop
Don't Please see <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F this FAQ>

11 years ago | 0

| accepted

Answered
Help with iteration problem
seems like a simple 'for loop' would do the trick x = 0:.1:1; for x v=char(x./(s^2+1)); % v is function of (x,s...

11 years ago | 0

Answered
'solve' Command - Only shows one value
try this (without using string input) syms t >> double(solve(1-2.*sin(t))) ans = 0.5236 2.618...

11 years ago | 0

Solved


Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

11 years ago

Solved


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

11 years ago

Solved


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

11 years ago

Solved


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

11 years ago

Answered
imagesc - change background colour
I am not sure exactly what you are asking, but is this close? x = rand(150)*1.5-3; imagesc(x) cmap = colormap; cmap_mo...

11 years ago | 0

| accepted

Answered
How to solve a subscript problem by creating a matrix from x,y-arrays?
perhaps something like this for filenumber = 10:5:i*10; fid =fopen(['C:\Users\Emerson\Desktop\',num2str(filenumber/10)...

11 years ago | 0

| accepted

Answered
Changing the colour of data points on a graph that satisfy a certain criteria
There are many ways of doing this. Here is one clear;clc x = rand(2000,1); y = rand(2000,1); c = hypot(x -.5,...

11 years ago | 1

Answered
Fibonacci Sequence and Caluclating a phi value
close, I have tried to keep intact most of what you have done clear;clc; num1=input('Enter an integer,greater than three...

11 years ago | 0

| accepted

Answered
Find the number of times a number is in an array.
one way x = randi(10,100,1); %example data >> sum(x==5) ans = 8

11 years ago | 0

Answered
Displaying a Matrix in Long Format
try separating the 'format long' from the rest of your code perhaps this will help format long; >> rand(3,4) ans = ...

11 years ago | 0

| accepted

Answered
How do I modify this to efficiently solve several systems of equations using gaussian elimination?
maybe this can help <http://www.mathworks.com/matlabcentral/answers/13667#answer_18662>

11 years ago | 0

Answered
How to read the entire column of a file and save it in a variable?
try using this A=textscan(fid,repmat('%s',1,9),'HeaderLines',5); >> A{4}(1:2:end) ans = '96318.74847...

11 years ago | 1

Answered
random resampling with rebalancement
r = randi(2748,100,1); x = zeros(252,100); for k = 1:100 x(:,k) = Y(r(k):r(k) + 251); end

11 years ago | 0

| accepted

Answered
Circular indexing of an array
I don't know if it will help but you can use X as the index variable in the loop X = [10 1:10] for X ... end alterna...

11 years ago | 0

Answered
Plotting Points in 3D
from the documentation: scatter3(X,Y,Z,S,C) scatter3(X,Y,Z,S,C) displays colored circles at the locations specified by ...

11 years ago | 1

| accepted

Answered
Finding number of points inside a circle and assign them into a matrix
one way to do it: clc;clear xy = rand(100,2); plot(xy(:,1),xy(:,2),'b.') hold on t = linspace(0,2*pi); plot(...

11 years ago | 2

| accepted

Answered
how do i fit many different curves to many different quardratic equations
Please see this <http://www.mathworks.com/matlabcentral/answers/24086#answer_31607 answer>

11 years ago | 0

Answered
How do I get the command prompt to start on a new line in my command window.
you need to add a new line '\n' to your display of the answer: fprintf('no new line') no new line>> ...

11 years ago | 0

| accepted

Answered
Read specific column from txt file
fid = fopen('test.txt') n = textscan(fid,'%*d %*s %*s %*s %*s %*f %*f %f %*f %*f %*f','delimiter',' ') n{:} ans...

11 years ago | 1

| accepted

Answered
Having trouble with a data set in MATLAB Programming
doc textread doc polyfit

11 years ago | 0

Answered
calculate the correlation of a number of time series
Don't know what you are trying to accomplish, but here is one way clc; clear data = rand(365,5); for k = 1:5 ...

11 years ago | 0

Load more