Answered
How to make a 3D surface where colour will represent the fourth variable.
You need to scale |R| to a colormap index, and use |ind2rgb| to convert it to the |C| that |surf| is expecting in the |surf(X,Y,...

9 years ago | 0

Answered
imresize3 function in older version of matlab
Edit (sorry, too quick): Nope. As you can see in the <https://www.mathworks.com/help/images/ref/imresize3.htm doc for R2017b>, ...

9 years ago | 1

| accepted

Answered
How to add axis limits to imagesc plot?
You overlooked the exponent. The x-axis stretches to 3e5, not just 30.

9 years ago | 0

| accepted

Answered
Numbering images using function 'websave'.
This is what <https://www.mathworks.com/help/matlab/ref/try.html |try| and |catch|> are for. filenamecounter=0; for n=1:...

9 years ago | 0

| accepted

Answered
Want to convert hyperspectral .mat file to multiple .jpeg files
You can just use indexing. for n=1:103 IM_slice=A(:,:,n); imwrite(IM_slice,sprintf('%03d.jpeg',n)); end ...

9 years ago | 1

| accepted

Answered
Can the output of the weekday function be modified to return different numbers?
Depending on your release (and maybe even OS), you might be able to edit the internal Matlab function, but you shouldn't. It is ...

9 years ago | 0

| accepted

Answered
Hi, I have a matlab R2013a, please how I can get or purchase a new licence key by online to activate it ?
<https://www.mathworks.com/store> If that is not what you're looking for, just hit the |Contact Us| button at the top of the ...

9 years ago | 0

| accepted

Answered
How can I keep figures invisible when toggling between axes?
You can either use the obvious solution/workaround of calling |set(gcf,'Visible','off')| immediately after that line, or just av...

9 years ago | 0

Answered
How do I reference when an image touches another?
You can save the positions of the player and the monster in separate position vectors (then you can use |sqrt((x_p-x_m)^2+(y_p-y...

9 years ago | 0

| accepted

Answered
How to Plot seasonal variations using a for loop
Convert the subs of jan-mar to indices (see |doc sub2ind|), subtract 1, and there you are. Don't forget to add a special case fo...

9 years ago | 0

Answered
To run a program to every 5 minutes
I think I would try to do this on an OS level. Otherwise you could use something like this: t=tic; for k=1:10 %insert act...

9 years ago | 0

| accepted

Answered
How to return structs properly
You need to pre-allocate all fields of the struct. maxStrain_at_maxForce = struct('eeff',zeros(6,1),'exy',zeros(6,1),... ...

9 years ago | 0

Answered
How to overlay two images which is transparent on each other?
Apart from the point Adam is making, you can also have a look at <https://www.mathworks.com/help/images/ref/imfuse.html |imfuse|...

9 years ago | 0

Answered
3D point cloud labeling, (Annotation on a particular x,y,z coordinate)
According to the <https://www.mathworks.com/help/matlab/ref/text.html documentation> of |text| you can insert a text at a 3D pos...

9 years ago | 0

| accepted

Answered
Matlab can not evaluate the maximum of an array?
I have hardly ever worked with Simulink, so I might be wrong, but I would think the function gets executed every time step (whic...

9 years ago | 0

Answered
How to edit data points and add grid lines on a non-tradditional plot?
The code below will create a patch where the faces are fully transparent, so you only keep the edges. It will be part of the fun...

9 years ago | 1

| accepted

Submitted


TrianglePlot
Plot points or lines on a triangular field

9 years ago | 210 downloads |

0.0 / 5
Thumbnail

Answered
loop with easy underfunction
Because you are overwriting it every iteration. function F=tretti for k=1:3 F{k}=results(k); end function...

9 years ago | 0

Answered
Is there any 32-bit version of R2017-b for Windows 10?
<https://www.mathworks.com/matlabcentral/answers/271876-windows-32-bit-version-is-not-availble-for-2016a#answer_212621 No (and t...

9 years ago | 2

| accepted

Answered
Assignment has more non-singleton rhs dimensions than non-singleton subscripts error.
Check for typos. This error occurs when the size of the left hand doesn't match the size on the right hand. (there are more dime...

9 years ago | 1

| accepted

Answered
Can't solve function to variable fast
y=1:1000; valid_y=find(rem(y.^3,319)==254); Like this?

9 years ago | 0

Answered
how to move the graph in my gui? Please
You can enable the menu bar, or use the underlying callbacks in your own callbacks. (e.g. with <https://www.mathworks.com/help/m...

9 years ago | 1

| accepted

Answered
I saved pixel values of a gray scale image 48x48 which is a picture of face, now i want to save these pixel values back into an image(gray face image), Can this be done?? if yes, then tell me kindly how??
You can read back the file (just use your favorite internet search engine to find a myriad of people asking how to do so). You c...

9 years ago | 0

Answered
Program error!! Why??
Without the file, the only thing I see, is that you have an extra space in your line: bestframe = frame_history(:,:,:,maxbr...

9 years ago | 0

Answered
: Indexing with NaN, and python zip function in matlab
v = [4 10;20 8]; a = [1 2;2 2]; index=(sub2ind(size(v),a(1,:),a(2,:))); result=nan(size(index)); result(~isnan(index))=v(i...

9 years ago | 1

| accepted

Answered
Info how to plot this signal in Matlab<
There are multiple way to do this, which you'll learn in just about every tutorial for Matlab. You can try the <https://matlabac...

9 years ago | 0

Answered
Bar chart showing weekly, monthly and 3-M changes
The <https://www.mathworks.com/help/matlab/ref/bar.html |doc bar|> seems a good place to start. Although I don't see why you sho...

9 years ago | 0

Answered
Find Distance between multiple points.
This is a relatively large problem. Try to break it up in smaller bits. Calculating distance between two points is trivial (just...

9 years ago | 0

| accepted

Answered
Index exceeds matrix dimensions.
Let's start with the obvious problem: You didn't post a question, just a wall of unformatted code. Ask an actual question instea...

9 years ago | 0

Answered
How to define a function?
What are you trying to do? If you don't convert the symbolic function to an anonymous function, it works just fine. %clear ...

9 years ago | 0

Load more