Beantwortet
common colorbar
Hard to say without seeing the code, but it looks like there's some condition that makes it possible for |layoutColorbar| to com...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
How to save statitiscs displayed in workspace as text file?
Do you mean you want a list of variable names, sizes, classes, bytes used,...? If so, you could do |vars = whos|, then save/wri...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
errors in this code - 1D PDE with Boundary Condition
I don't know exactly what you're trying to do with |t| and |T| (and associated |nt| and |NT|), but the result is that |c| and |C...

mehr als 15 Jahre vor | 0

Beantwortet
loop for scatter plot
Like this? plot([A,A,A],[B,C,D],'o') *EDIT* Based on your comment, here's a new answer: allX = [A,A,A]; allY = [B,C,D];...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
Multi-variable minimization
What do you mean by "the minimum variables"? |x| is a vector, so what are you trying to minimize? All the x values? The norm ...

mehr als 15 Jahre vor | 0

Beantwortet
Newton Raphson method
# Please format your code to make it more readable # Why do you want to display the iterations? But either way, just add a |di...

mehr als 15 Jahre vor | 0

Beantwortet
Problem with my Code?
That message generally means that your function file isn't on the MATLAB path. Is Newton.m in your current directory? There ...

mehr als 15 Jahre vor | 0

Beantwortet
Matrix visualisation with coloured box and numbers
|imagesc| and |text|. If it's like sudoku in that the range of values is fixed, use |image| and a custom |colormap|. *EDIT TO ...

mehr als 15 Jahre vor | 1

Beantwortet
column into row
xcol = xx(:); Although, if you want to go by rows, transpose |xx| first.

mehr als 15 Jahre vor | 0

Beantwortet
Graphical input from the grid - similar to game of life
|image| or |imagesc| with a custom three-color |colormap| to make the image, then |ginput| to get the point (and |round| as nece...

mehr als 15 Jahre vor | 0

Beantwortet
how to load and calculate data from a file?
If |x| is a vector of 21 values (and all the other values are scalars), then all you need to do is idk=Is*(exp(x/(m*VT))-1)...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
How to get a an XY plotted curve to match another curve based on observed values?
Sounds like a regression/curve fitting problem? The right function to use depends a bit on the form of the model. If it's just...

mehr als 15 Jahre vor | 0

Beantwortet
Validation of a date with a given format
fmt = 'dd mmm yyyy HH:MM:SS.FFF'; dt = []; while isempty(dt) x = input(['enter date string in ',fmt,' format: '],...

mehr als 15 Jahre vor | 2

Beantwortet
matlab data parsing help- pulling only certain characters
You could use |regexprep|, but you could also modify your |textscan| format specifier to "notice" but not read these in the firs...

mehr als 15 Jahre vor | 0

Beantwortet
Matrix help
If it's just a matter of how it's displayed: fprintf([repmat('%4s ',1,16),'\n'],C{:}) (Note, you normally need to trans...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
Sum and average even numbers
Why bother? The answer is |-Inf|. Your teacher needs to write more precise questions.

mehr als 15 Jahre vor | 3

Beantwortet
nice boxes for great linewidths
From my experiments, it appears to be a combination of what Matt Fig said, and just the translation to png. This worked OK for ...

mehr als 15 Jahre vor | 1

Beantwortet
dlm read error in data import - alternatives?
Give this a try function windcan fprintf ('See http://climate.weatheroffice.ec.gc.ca/climateData/canada_e.html \n se...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
3D Plotting with Vectors and Meshgrid
There are times when, much as I love to mess with matrices and/or |bsxfun|, a |for|-loop is just the easiest way to go: Z = z...

mehr als 15 Jahre vor | 1

| akzeptiert

Beantwortet
dataset
x = dataset('file','simple.txt','delimiter',' ') x.Properties.VarNames x.a plot(x.a,x.b,'o-')

mehr als 15 Jahre vor | 1

Beantwortet
fitting lognaormal distribution with constraints
The lognormal distribution has two parameters (mu & sigma). If you impose two constraints (namely that the fitted distribution ...

mehr als 15 Jahre vor | 1

| akzeptiert

Beantwortet
Write a program that calculates sum of the integers numbers
disp(240) Or, for pedants who claim that evaluation is not the same as calculation, disp(239+1)

mehr als 15 Jahre vor | 1

Beantwortet
ODE45
You do not have to write a function file, but you do have to define a function. You've defined |y1| to |y4| as numeric variable...

mehr als 15 Jahre vor | 0

Beantwortet
Numerical solution of integral equation with parametric variable
A variation on Jarrod's approach, using function handles (because everyone loves function handles): myFunc = @(t,b) exp(t*b...

mehr als 15 Jahre vor | 1

Beantwortet
system of odes
The problem is your argument list for |fxx|. ODE functions should be functions of the independent variable, then the dependent ...

mehr als 15 Jahre vor | 1

| akzeptiert

Beantwortet
Contributors metainfo: reputation and more
For once I get to scoop Walter: *Congratulations to Walter R for successfully avoiding any Y2K issues in rolling over to the ...

mehr als 15 Jahre vor | 0

Beantwortet
Plot different classes in different colors
<http://www.mathworks.com/help/toolbox/stats/gscatter.html |gscatter|> doesn't do what you're looking for?

mehr als 15 Jahre vor | 1

Beantwortet
Doubt math
OK, to expand on the cyclist's answer: # rewrite your equation in the form f(I) = 0: ICC - IR.*(exp((V1+Rs*I)./(m.*VT))-1) - ...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
Problem only reading in select data
On the off-chance Walter's approach doesn't work (eg there are more than two block formats in the file), here's a more brute-for...

mehr als 15 Jahre vor | 1

| akzeptiert

Beantwortet
Error in the loop
The problem is that |Z1| is the median of |x|, and |x| has an even number of elements. In that case, the median is the average ...

mehr als 15 Jahre vor | 0

Mehr laden