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

9 years ago | 5

| accepted

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

9 years ago | 0

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

9 years ago | 0

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

9 years ago | 0

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

9 years ago | 0

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

9 years ago | 0

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>

9 years ago | 0

| accepted

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

9 years ago | 0

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

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

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

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

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

9 years ago

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

9 years ago | 0

| accepted

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

9 years ago | 0

| accepted

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

9 years ago | 1

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

9 years ago | 0

| accepted

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

9 years ago | 0

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

9 years ago | 0

| accepted

How do I modify this to efficiently solve several systems of equations using gaussian elimination?

9 years ago | 0

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

9 years ago | 1

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

9 years ago | 0

| accepted

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

9 years ago | 0

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

9 years ago | 1

| accepted

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

9 years ago | 2

| accepted

how do i fit many different curves to many different quardratic equations

9 years ago | 0

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

9 years ago | 0

| accepted

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

9 years ago | 1

| accepted