Putting arrows in a Matlab figure showing orientation of axes

I have plotted a VCG curve in Matlab using my code and data downloaded from physionet. Now I need to achieve arrows in the figure showing the orientation of the axes X, Y and Z. Exactly like in the picture. I have been trying to google about it for a while, but not a single hint. Could you please give me any advice?

This is what I want to achieve:
[img]https://i.stack.imgur.com/45FkY.jpg[/img]

What is the function of [~,n]=size(p) in MATLAB?

I've searched on the internet, but I can't figure out what this expression is useful for.
[code]function [val]=f_obiectiv(p) % functia obiectiv din problema celor n regine %{ gradul de "neconformitate" a unei permutari: numarul de pozitii distincte de pe tabla de sah pentru care reginele plasate in acele pozitii sunt in situatie de atac %} [~,n]=size(p); val=0; for i=1:n for j=i+1:n if(abs(i-j)==abs(p(i)-p(j))) val=val+1; end; end; end; % calitatea permutarii: numarul total de perechi de pozitii (regine) posibile - % numarul de perechi "neconforme" val=n*(n-1)/2-val; end[/code]

PIC10F200 - Software UART

I would like to write a software transmitter UART for the PIC10F200, the only problem is: It doesn't have a timer overflow interrupt. I don't know how i could manage that every pin toggle takes exactly the same time. My current approach looks like this: [code]#include <p10f200.inc> __CONFIG _WDTE_OFF & _CP_OFF & _MCLRE_ON tmp1 EQU 10h tmp2 EQU 11h org 0x00 movlw 0FFh movwf GPIO movlw 00h tris 6 main movlw 0A5h movwf tmp1 movlw 08h movwf tmp2 bcf GPIO,1 ;Start bit call TransmitByte bsf GPIO,1 ;Stop bit goto main TransmitByte: sr rlf tmp1,f ;shift tmp1 to the left (affects carry bit) btfss STATUS,C ;check carry bcf GPIO,1 ;turn pin to '0' if carry = '0' btfsc STATUS,C bsf GPIO,1 ;turn pin to '1' if carry = '1' decfsz tmp2 ;decrement loop variable goto sr retlw 0 END[/code] This code above looks like this:

https://picload.org/image...pdr/uart_pic10f200.png

Pickit3: EEPROM erased while reading device

Hello all,
PIC16F887
I've made this test:
1)Program some EEPROM cells with fixed values, inside my program, and delete this portion of code
2)In the same program, read EEPROM cells: if values match with programmed ones, blink led
Ok, it works: even if I reprogam (preserving EEPROM), the LED blinks.
3)Read device memory

4)Led stops blinking

Any idea?
Thank you very much.

Using Wi-Fi demo boards with MLA

Has anyone had success in using the Wi-Fi demo boards (DV102411/DV102412) with the Microchip Libraries for Applications?

Looking for a good switch

I know this is a little off topic for this forum, but wanted to throw it out there anyway. I am looking for a small surface mount momentary switch (like a tactile switch) that is a SPDT or DPDT variety. I am making a development board for the PIC32MZ chips, and want to have an on board switch for debugging use. Does anyone know of any examples I could look at? I have found plenty of SPST, but that will not achieve that software feature I need it for.

Any help would be appreciated!

PIC10F202 to PIC10F204

Need little help. Possible this small timer program run in PIC10F204 ? (Currently, I have only 10F204)
Thanks,

(PIC10F202 Flash memory 512, - PIC10F204 256)
------------------------------------------------------------------
Code:

list p=10F202
#include <P10F202.INC>

__config _CP_ON & _MCLRE_OFF & _WDT_OFF

byt1 equ .16 ;
byt2 equ .17 ;
byt3 equ .18 ;
ORG 0x0000 ; reset vektor
init

MOVWF OSCCAL
MOVLW 0xE
TRIS .6
MOVLW b'11111000'
OPTION
CLRF GPIO
CLRF TMR0
mx7
MOVF TMR0, W
BTFSS STATUS,Z
GOTO mxc
BCF GPIO, 0
GOTO mx7
mxc
DECF TMR0, F
BSF GPIO, 0
CALL mx10
GOTO mx7
mx10
MOVLW .7
MOVWF byt1
MOVLW 0x2f
MOVWF byt2
MOVLW .3
MOVWF byt3
mx16
DECFSZ byt1, F
GOTO mx19
DECFSZ byt2, F
mx19
GOTO mx1b
DECFSZ byt3, F
mx1b
GOTO mx16
NOP
NOP
NOP
RETLW 0

END

How to print the Omega symbol using sprintf?

Hi,
I have this code that works OK.
==============================================
char cstr[40];
sprintf(cstr, "Contact Resistance : %d, ", contact_resistance); //format string
write_lcd_line4(cstr, 1); //Write to LCD
===================================================

It displays "Contact Resistance: 12345".
I would like to print " Contact Resistance: 12345 <OMEGA symbol>"
I am using MPLAB X.
Any idea please?

PIC I/O For Simpleminds

Developers

Can I get a starting point with this?

Been reading section in datasheet of PIC16F54 about pins.

Just looking for sort of general explanation about this.

Thanks.

XC8 Table Array Workaround for PIC18FXXK40, Slicon Rev A3

Hello All,

Like many of you I ran into errata DS80000712B. Adding +NVMREG in the errata field in the linker properties did not change the symptom for me. I found other threads on the forum with the same result. Adding powerup.as worked for me, as it did for others. One thing to be careful of is that the syntax and formatting of the .as file is exact. The code should look like the attached photo. Make sure that you do not have any extraneous blank lines after the "end" keyword on line 9. Blank lines after end will give you a preprocessor syntax error which is blank.

To make it easier I've also attached a working powerup.as file. Just add this file to your project as a Source file. One more thing, if you use arrays in EEPROM the NVMREG bits will be changed.
Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir